Use Ocaml Language. Task 2 Implement the function tree_map : ’a tree -> (’a -> ’b) -> ’b tree that returns a tree with the same structure as the original tree, but with the given function applied to every node. Use tree_fold. Do not use recursion. There are various ways of travers
Use Ocaml Language. Task 2 Implement the function tree_map : ’a tree -> (’a -> ’b) -> ’b tree that returns a tree with…