solution to ocaml 99 problems