OCaml implementation of NbE