package accessor

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

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

module A : sig ... end

Signature

val map : (Base.unit -> 'a -> 'b, Base.unit -> 'at -> 'bt, [> Subtyping.many ]) t -> 'at -> f:('a -> 'b A.t) -> 'bt A.t
val mapi : ('i -> 'a -> 'b, Base.unit -> 'at -> 'bt, [> Subtyping.many ]) t -> 'at -> f:('i Index.t -> 'a -> 'b A.t) -> 'bt A.t
val all : (Base.unit -> 'a A.t -> 'a, Base.unit -> 'at -> 'bt, [> Subtyping.many ]) t -> 'at -> 'bt A.t
val all_unit : (Base.unit -> Base.unit A.t -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) t -> 'at -> Base.unit A.t
val iter : (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) t -> 'at -> f:('a -> Base.unit A.t) -> Base.unit A.t
val iteri : ('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) t -> 'at -> f:('i Index.t -> 'a -> Base.unit A.t) -> Base.unit A.t
val sum : (module Base.Container.Summable with type t = 'sum) -> (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) t -> 'at -> f:('a -> 'sum A.t) -> 'sum A.t
val sumi : (module Base.Container.Summable with type t = 'sum) -> ('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) t -> 'at -> f:('i Index.t -> 'a -> 'sum A.t) -> 'sum A.t
val count : (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) t -> 'at -> f:('a -> Base.bool A.t) -> Base.int A.t
val counti : ('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) t -> 'at -> f:('i Index.t -> 'a -> Base.bool A.t) -> Base.int A.t
val map_reduce : (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) t -> 'at -> empty:'b -> combine:('b -> 'b -> 'b) -> f:('a -> 'b A.t) -> 'b A.t
val map_reducei : ('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.many_getter ]) t -> 'at -> empty:'b -> combine:('b -> 'b -> 'b) -> f:('i Index.t -> 'a -> 'b A.t) -> 'b A.t
val map_reduce_nonempty : (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.nonempty_getter ]) t -> 'at -> combine:('b -> 'b -> 'b) -> f:('a -> 'b A.t) -> 'b A.t
val map_reduce_nonemptyi : ('i -> 'a -> _, Base.unit -> 'at -> _, [> Subtyping.nonempty_getter ]) t -> 'at -> combine:('b -> 'b -> 'b) -> f:('i Index.t -> 'a -> 'b A.t) -> 'b A.t
OCaml

Innovation. Community. Security.