(define (append a b) (if (null? a) b (cons (car a)(append (cdr a) b)))) Make a list of sublists of given list. Each sub list lacks just one entry of input. (define (sl l) (if (null? l) '() (cons (cdr l) (map (lambda (q) (cons (car l) q)) (sl (cdr l)))))) let rec sl l = match l with [] -> [] | h::t -> t::List.map (fun q -> h::q) (sl t);;