Module Accessor.Of_applicative
Of_applicative
and Of_applicative2
can be used to generate map-like functions that can use applicative effects. See also Of_monad
, which gives more control over the relationship between side effects and monadic effects.
Parameters
A : sig ... end
Signature
include Accessor__.Applicative_signatures_intf.Applicative_s2 with type ('a, _) t := 'a t
val map : ((Base.unit -> 'a -> 'b, Base.unit -> 'at -> 'bt, [> Subtyping.many ]) accessor -> 'at -> f:('a -> ('b, 'e) t) -> ('bt, 'e) t) optional_args
val mapi : (('i -> 'a -> 'b, Base.unit -> 'at -> 'bt, [> Subtyping.many ]) accessor -> 'at -> f:('i Index.t -> 'a -> ('b, 'e) t) -> ('bt, 'e) t) optional_args
val all : (Base.unit -> ('a, 'e) t -> 'a, Base.unit -> 'at -> 'bt, [> Subtyping.many ]) accessor -> 'at -> ('bt, 'e) t
val all_unit : (Base.unit -> (Base.unit, 'e) t -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) accessor -> 'at -> (Base.unit, 'e) t
val iter : ((Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) accessor -> 'at -> f:('a -> (Base.unit, 'e) t) -> (Base.unit, 'e) t) optional_args
val iteri : (('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) accessor -> 'at -> f:('i Index.t -> 'a -> (Base.unit, 'e) t) -> (Base.unit, 'e) t) optional_args
val sum : ((module Base.Container.Summable with type t = 'sum) -> (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) accessor -> 'at -> f:('a -> ('sum, 'e) t) -> ('sum, 'e) t) optional_args
val sumi : ((module Base.Container.Summable with type t = 'sum) -> ('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) accessor -> 'at -> f:('i Index.t -> 'a -> ('sum, 'e) t) -> ('sum, 'e) t) optional_args
val count : ((Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) accessor -> 'at -> f:('a -> (Base.bool, 'e) t) -> (Base.int, 'e) t) optional_args
val counti : (('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) accessor -> 'at -> f:('i Index.t -> 'a -> (Base.bool, 'e) t) -> (Base.int, 'e) t) optional_args
val map_reduce : ((Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) accessor -> 'at -> empty:'b -> combine:('b -> 'b -> 'b) -> f:('a -> ('b, 'e) t) -> ('b, 'e) t) optional_args
val map_reducei : (('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) accessor -> 'at -> empty:'b -> combine:('b -> 'b -> 'b) -> f:('i Index.t -> 'a -> ('b, 'e) t) -> ('b, 'e) t) optional_args
val map_reduce_nonempty : ((Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.nonempty_getter ]) accessor -> 'at -> combine:('b -> 'b -> 'b) -> f:('a -> ('b, 'e) t) -> ('b, 'e) t) optional_args
val map_reduce_nonemptyi : (('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.nonempty_getter ]) accessor -> 'at -> combine:('b -> 'b -> 'b) -> f:('i Index.t -> 'a -> ('b, 'e) t) -> ('b, 'e) t) optional_args