(* see List.map *) let map f = let rec mp xs = match xs with [] -> [] | x :: xs -> f x :: mp xs in mp (* try: map (function x -> x + 1) [3;5;7];; *)