Module Preface_specs.Monad_plus

Monad_plus is a kind of Monoid on Monad. A Monad_plus is formally a Monad with neutral and combine. So a Monad_plus is also a Monad.

Laws

  1. All alternatives laws

Minimal definition

module type WITH_NEUTRAL_AND_COMBINE = sig ... end

Minimal interfaces of Alternative without Monad.

module type WITH_MAP_AND_JOIN = sig ... end

Minimal definition using neutral, combine, return, map and join.

module type WITH_KLEISLI_COMPOSITION = sig ... end

Minimal definition using neutral, combine, return, compose_left_to_right.

module type WITH_BIND = sig ... end

Minimal definition using neutral, combine, return, bind.

Structure anatomy

module type CORE = sig ... end

Basis operations.

module type OPERATION = sig ... end

Additional operations.

module type INFIX = sig ... end

Infix operators.

module type SYNTAX = sig ... end

Syntax extensions

Complete API

module type API = sig ... end

The complete interface of a Monad_plus.

Additional references