Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on monads should be extended to include convenient syntax #198

Open
patrick-nicodemus opened this issue Dec 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@patrick-nicodemus
Copy link

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.

@clarksmr clarksmr added the enhancement New feature or request label Jan 5, 2025
@clarksmr
Copy link
Contributor

clarksmr commented Jan 5, 2025

Yes, that would be a good idea. I'm happy to receive a PR for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants