working on the 99 problems in OCaml