Code Challenge in OCaml