preface

An opinionated library for function programming (à La Haskell)
IN THIS PACKAGE
Parameter #1 Preface_make . Monad_plus . Syntax . Core
type 'a t

The type held by the Monad.

include Preface_specs.Monad.WITH_RETURN with type 'a t := 'a t
include Preface_specs.Bind.WITH_BIND with type 'a t := 'a t
val bind : ( 'a -> 'b t ) -> 'a t -> 'b t

bind f m passes the result of computation m to function f.

include Preface_specs.Monad.WITH_RETURN with type 'a t := 'a t
include Preface_specs.Bind.WITH_MAP_AND_JOIN with type 'a t := 'a t
val map : ( 'a -> 'b ) -> 'a t -> 'b t

Mapping over from 'a to 'b over 'a t to 'b t.

val join : 'a t t -> 'a t

join remove one level of monadic structure, projecting its bound argument into the outer level.

include Preface_specs.Monad.WITH_RETURN with type 'a t := 'a t
val return : 'a -> 'a t

Lift a value from 'a into a new 'a t.

include Preface_specs.Bind.WITH_KLEISLI_COMPOSITION with type 'a t := 'a t
val compose_left_to_right : ( 'a -> 'b t ) -> ( 'b -> 'c t ) -> 'a -> 'c t

Composing monadic functions using Kleisli Arrow (from left to right).

val combine : 'a t -> 'a t -> 'a t

Combine two values of 'a t into one.

val neutral : 'a t

The neutral element of the Alternative.