Remix.run Logo
edwintorok 6 hours ago

That can be indeed very confusing when you initially learn the language. However there are 3 things that can help:

* An auto-formatter (ocamlformat integration in your editor, or ocaml-top) that shows how the actual nesting looks like

* You can add ;; at the end of a top-level function to get a syntax error at a better location

* Use the LSP integration of your editor which will show you where the error is as you type, so you catch the problem early