package orsetto

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Use Create(B) to make the core monad functions for the basis module B.

Parameters

module B : Basis

Signature

val return : 'r -> ('p, 'q, 'r) B.t

Use return a to apply the binding to a.

val bind : ('p, 'q, 'a) B.t -> ('a -> ('p, 'q, 'b) B.t) -> ('p, 'q, 'b) B.t

Use bind m f to bind f to the value returned by m.

val map : ('p, 'q, 'a) B.t -> f:('a -> 'b) -> ('p, 'q, 'b) B.t

Use map m f to return the result of applying f to the value returned by m.

module Infix : Infix with type ('p, 'q, 'r) t := ('p, 'q, 'r) B.t

Open Infix to include the infix monad operators.

val disregard : ('p, 'q, 'r) B.t -> ('p, 'q, unit) B.t

Use disregard m to ignore the value returned by m and apply the unit value to the bound function.