这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@patrick-nicodemus

Description

@patrick-nicodemus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions