Module type Alternative.WITH_PURE_AND_APPLY

Minimal definition using neutral, combine, pure and apply.

include Applicative.WITH_PURE_AND_APPLY
type 'a t

The type held by the Applicative.

inline

include Indexed_applicative.WITH_PURE_AND_APPLY with type ('a, _) t := 'a t
include Indexed_applicative.WITH_PURE with type ('a, 'index) t := 'a t
val pure : 'a -> 'a t

Lift a value from 'a into a new t.

include Indexed_apply.WITH_APPLY with type ('a, 'index) t := 'a t
val apply : ('a -> 'b) t -> 'a t -> 'b t

May apply a function wrapped into an t to a value also wrapped into an t.

include WITH_NEUTRAL_AND_COMBINE with type 'a t := 'a t
val combine : 'a t -> 'a t -> 'a t

Combine two values of t into one.

val neutral : 'a t

The neutral element of the Alternative.