First (very basic) functional ocaml version