Monad.Choice
A choice monad interface.
A choice monad is a monad with an exceptional control flow, akin to the Fail
monad, except that it may not hold an additional error information. In exchange several control flow operators are provided. Basically, a choice computation may have zero or one result.
Example:
let sqrt x =
guard (x > 0.) >>| fun () ->
sqrt x
Implemented by: