Add OCaml implementation

This adds the initial OCaml implementation.