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