Module type Container_intf.S1_permissions
val mem : ('a, [> Core_kernel.Perms.Export.read ]) t -> 'a -> equal:('a -> 'a -> Core_kernel__.Import.bool) -> Core_kernel__.Import.boolChecks whether the provided element is there, using polymorphic compare if
equalis not provided.
val length : (_, [> Core_kernel.Perms.Export.read ]) t -> Core_kernel__.Import.intval is_empty : (_, [> Core_kernel.Perms.Export.read ]) t -> Core_kernel__.Import.boolval iter : ('a, [> Core_kernel.Perms.Export.read ]) t -> f:('a -> Core_kernel__.Import.unit) -> Core_kernel__.Import.unitval fold : ('a, [> Core_kernel.Perms.Export.read ]) t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accumfold t ~init ~freturnsf (... f (f (f init e1) e2) e3 ...) en, wheree1..enare the elements oft
val fold_result : ('a, [> Core_kernel.Perms.Export.read ]) t -> init:'accum -> f:('accum -> 'a -> ('accum, 'e) Core_kernel.Result.t) -> ('accum, 'e) Core_kernel.Result.tfold_result t ~init ~fis a short-circuiting version offoldthat runs in theResultmonad. Iffreturns anError _, that value is returned without any additional invocations off.
val fold_until : ('a, [> Core_kernel.Perms.Export.read ]) t -> init:'accum -> f:('accum -> 'a -> ('accum, 'final) Continue_or_stop.t) -> finish:('accum -> 'final) -> 'finalfold_until t ~init ~f ~finishis a short-circuiting version offold. IffreturnsStop _the computation ceases and results in that value. IffreturnsContinue _, the fold will proceed. Iffnever returnsStop _, the final result is computed byfinish.
val exists : ('a, [> Core_kernel.Perms.Export.read ]) t -> f:('a -> Core_kernel__.Import.bool) -> Core_kernel__.Import.boolReturns
trueif and only if there exists an element for which the provided function evaluates totrue. This is a short-circuiting operation.
val for_all : ('a, [> Core_kernel.Perms.Export.read ]) t -> f:('a -> Core_kernel__.Import.bool) -> Core_kernel__.Import.boolReturns
trueif and only if the provided function evaluates totruefor all elements. This is a short-circuiting operation.
val count : ('a, [> Core_kernel.Perms.Export.read ]) t -> f:('a -> Core_kernel__.Import.bool) -> Core_kernel__.Import.intReturns the number of elements for which the provided function evaluates to true.
val sum : (module Base.Container.Summable with type t = 'sum) -> ('a, [> Core_kernel.Perms.Export.read ]) t -> f:('a -> 'sum) -> 'sumReturns the sum of
f ifor i in the container
val find : ('a, [> Core_kernel.Perms.Export.read ]) t -> f:('a -> Core_kernel__.Import.bool) -> 'a Core_kernel__.Import.optionReturns as an
optionthe first element for whichfevaluates to true.
val find_map : ('a, [> Core_kernel.Perms.Export.read ]) t -> f:('a -> 'b Core_kernel__.Import.option) -> 'b Core_kernel__.Import.optionReturns the first evaluation of
fthat returnsSome, and returnsNoneif there is no such element.
val to_list : ('a, [> Core_kernel.Perms.Export.read ]) t -> 'a Core_kernel__.Import.listval to_array : ('a, [> Core_kernel.Perms.Export.read ]) t -> 'a Core_kernel__.Import.arrayval min_elt : ('a, [> Core_kernel.Perms.Export.read ]) t -> compare:('a -> 'a -> Core_kernel__.Import.int) -> 'a Core_kernel__.Import.optionReturns a min (resp max) element from the collection using the provided
comparefunction. In case of a tie, the first element encountered while traversing the collection is returned. The implementation usesfoldso it has the same complexity asfold. ReturnsNoneiff the collection is empty.
val max_elt : ('a, [> Core_kernel.Perms.Export.read ]) t -> compare:('a -> 'a -> Core_kernel__.Import.int) -> 'a Core_kernel__.Import.option