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 = ....
Monadic Synax Extensions
- ppx_monad: Monadic syntax extension.
- ppx_let: A monadic syntax extension from Jane Street.
- ocaml-monadic: Another monadic syntax extension.
- 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.