package mechaml

  1. Overview
  2. Docs

The Syntax module implements the monadic operators provided by OCaml 4.08

val let* : 'a m -> ('a -> 'b m) -> 'b m
val and* : 'a m -> 'b m -> ('a * 'b) m

The semantic of ( and* ) is the same as in Agent.Monad.List.iter_p, that is the two elements are fed with the same initial agent and evaluated in parallel. As there is no reason to choose one state over the other as a result, we restore the state to the same initial value.

val let+ : 'a m -> ('a -> 'b) -> 'b m
val and+ : 'a m -> 'b m -> ('a * 'b) m
OCaml

Innovation. Community. Security.