Added an overengineered solution of 9th problem in OCaml