static List prefix(const List L, int n) { if(n == 0 || isEmpty(L)) { return emptyList; } else { return cons(head(L), prefix(tail(L), n-1)); } }