Write a tail recursive version of the map function
Anonymous
let map f l = let rec map' f l x = match l with |[] -> x [] |hd::tl -> map' f tl (fun lst -> x ((f hd)::lst)) in map' f l (fun lst -> lst) ;;
Check out your Company Bowl for anonymous work chats.