-
Notifications
You must be signed in to change notification settings - Fork 150
Description
Since OCaml 4.08, OCaml has added convenient syntax for working with monads and applicative functors.
Binding operators were introduced to offer convenient syntax for working with monads and applicative functors; for those, we propose conventions using operators * and + respectively. They may be used for other purposes, but one should keep in mind that each new unfamiliar notation introduced makes programs harder to understand for non-experts. We expect that new conventions will be developed over time on other families of operator.
https://ocaml.org/manual/5.2/bindingops.html
I would like to extend this page to add a few simple examples of special let bindings as well as a link to the appropriate page in the OCaml documentation.
Note that at the moment the current official "informal" documentation for OCaml at https://ocaml.org/docs/monads just links back to this textbook, so this page is likely the primary reference for monads in OCaml that most people will find when searching.