package accessor_base

  1. Overview
  2. Docs

ok and error are the same as Result.ok and Result.error, but specialized for Or_error.

val ok : ('i -> 'a -> 'b, 'i -> 'a Base.Or_error.t -> 'b Base.Or_error.t, [< Accessor_base__.Import.variant ]) Accessor.t
val error : (_, Base.Error.t, 'a Base.Or_error.t, [< Accessor_base__.Import.variant ]) Accessor.Simple.t
include Accessor.Monad.S with type 'a t := 'a Base.Or_error.t
val map : ?how:[ `Parallel | `Sequential ] -> (Base.unit -> 'a -> 'b, Base.unit -> 'at -> 'bt, [> Accessor.Subtyping.many ]) Accessor.t -> 'at -> f:('a -> 'b Base.Or_error.t) -> 'bt Base.Or_error.t
val mapi : ?how:[ `Parallel | `Sequential ] -> ('i -> 'a -> 'b, Base.unit -> 'at -> 'bt, [> Accessor.Subtyping.many ]) Accessor.t -> 'at -> f:('i Accessor.Index.t -> 'a -> 'b Base.Or_error.t) -> 'bt Base.Or_error.t
val all : (Base.unit -> 'a Base.Or_error.t -> 'a, Base.unit -> 'at -> 'bt, [> Accessor.Subtyping.many ]) Accessor.t -> 'at -> 'bt Base.Or_error.t
val iter : ?how:[ `Parallel | `Sequential ] -> (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.many_getter ]) Accessor.t -> 'at -> f:('a -> Base.unit Base.Or_error.t) -> Base.unit Base.Or_error.t
val iteri : ?how:[ `Parallel | `Sequential ] -> ('i -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.many_getter ]) Accessor.t -> 'at -> f:('i Accessor.Index.t -> 'a -> Base.unit Base.Or_error.t) -> Base.unit Base.Or_error.t
val sum : ?how:[ `Parallel | `Sequential ] -> (module Base.Container.Summable with type t = 'sum) -> (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.many_getter ]) Accessor.t -> 'at -> f:('a -> 'sum Base.Or_error.t) -> 'sum Base.Or_error.t
val sumi : ?how:[ `Parallel | `Sequential ] -> (module Base.Container.Summable with type t = 'sum) -> ('i -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.many_getter ]) Accessor.t -> 'at -> f:('i Accessor.Index.t -> 'a -> 'sum Base.Or_error.t) -> 'sum Base.Or_error.t
val count : ?how:[ `Parallel | `Sequential ] -> (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.many_getter ]) Accessor.t -> 'at -> f:('a -> Base.bool Base.Or_error.t) -> Base.int Base.Or_error.t
val counti : ?how:[ `Parallel | `Sequential ] -> ('i -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.many_getter ]) Accessor.t -> 'at -> f:('i Accessor.Index.t -> 'a -> Base.bool Base.Or_error.t) -> Base.int Base.Or_error.t
val map_reduce : ?how:[ `Parallel | `Sequential ] -> (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.many_getter ]) Accessor.t -> 'at -> empty:'b -> combine:('b -> 'b -> 'b) -> f:('a -> 'b Base.Or_error.t) -> 'b Base.Or_error.t
val map_reducei : ?how:[ `Parallel | `Sequential ] -> ('i -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.many_getter ]) Accessor.t -> 'at -> empty:'b -> combine:('b -> 'b -> 'b) -> f:('i Accessor.Index.t -> 'a -> 'b Base.Or_error.t) -> 'b Base.Or_error.t
val map_reduce_nonempty : ?how:[ `Parallel | `Sequential ] -> (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.nonempty_getter ]) Accessor.t -> 'at -> combine:('b -> 'b -> 'b) -> f:('a -> 'b Base.Or_error.t) -> 'b Base.Or_error.t
val map_reduce_nonemptyi : ?how:[ `Parallel | `Sequential ] -> ('i -> 'a -> _, Base.unit -> 'at -> _, [> Accessor.Subtyping.nonempty_getter ]) Accessor.t -> 'at -> combine:('b -> 'b -> 'b) -> f:('i Accessor.Index.t -> 'a -> 'b Base.Or_error.t) -> 'b Base.Or_error.t
OCaml

Innovation. Community. Security.