Answer to Question 32C-7

ListCell* prefix(const ListCell* L, int n)
{
  if(L == NULL || n == 0)
  {
    return NULL;
  }
  else
  {
    return cons(L->head, prefix(L->tail, n-1));
  }
}