You’re asking too many questions It is hard to address them all, so this may scare people away, my suggestion would be to split your question into several small and well-scoped questions. Anyway, you are indeed using OCaml a little bit incorrectly because you’re confusing data and types. Records,…