OCaml's solution of 4th problem