csci2041/public-class-repo/SamplePrograms/Sec_01_1:25pm/map.ml

6 lines
76 B
OCaml
Raw Permalink Normal View History

2018-01-29 23:35:31 +00:00
let rec map f l =
match l with
| [] -> []
| x::xs -> f x :: map f xs