View on GitHub

OCamlverse

Documenting everything about OCaml

Edit

Monads

Monads in OCaml are generally used in a slightly different way than in other languages. Rather than using >>= for monadic binds, values are generally bound using a ppx with a syntax such as let%bind x = ....

Additionally, as of OCaml 4.08, the langauge itself contains syntax for calling monadic functions. See this blog post and the OCaml manual on this.

Monadic Synax Extensions

Classic Monads

  • BAP Monads: BAP (Binary Analysis Platform) has an independent and comprehensive monad library. Rather than using a ppx, BAP makes use of Functors to create expressive monad hierarchies.