'Just for fun' ArrayList Java-like implementation in an Imperative Ocaml way