Added OCaml version with arrays