Module type Alternative.WITH_PURE_MAP_AND_PRODUCT

Minimal definition using neutral, combine, pure, map and product.

type 'a t

The type held by the Applicative.

inline

include Indexed_applicative.WITH_PURE_MAP_AND_PRODUCT 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_MAP_AND_PRODUCT with type ('a, 'index) t := 'a t
include Indexed_functor.WITH_MAP with type ('a, 'index) t := 'a t
val map : ('a -> 'b) -> 'a t -> 'b t

Mapping over t from 'a to 'b.

include Indexed_apply.WITH_PRODUCT with type ('a, 'index) t := 'a t
val product : 'a t -> 'b t -> ('a * 'b) t

Monoidal product between two 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.