Array.Permissionedinclude Core.Bin_prot.Binable.S1__local with type -'perms t := 'perms tval bin_shape_t : Bin_prot.Shape.t -> Bin_prot.Shape.tinclude sig ... endval bin_size_t : 'a. ('a, 'a t) Bin_prot.Size.sizer1val bin_write_t : 'a. ('a, 'a t) Bin_prot.Write.writer1val bin_read_t : 'a. ('a, 'a t) Bin_prot.Read.reader1val __bin_read_t__ : 'a. ('a, 'a t) Bin_prot.Read.vtag_reader1val bin_writer_t : 'a. ('a, 'a t) Bin_prot.Type_class.S1.writerval bin_reader_t : 'a. ('a, 'a t) Bin_prot.Type_class.S1.readerval bin_t : 'a. ('a, 'a t) Bin_prot.Type_class.S1.tinclude Ppx_compare_lib.Comparable.S1 with type -'perms t := 'perms tinclude Ppx_compare_lib.Comparable.S1__local with type -'perms t := 'perms tinclude Sexplib0.Sexpable.S1 with type -'perms t := 'perms tval t_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a tval sexp_of_t : 'a. ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.tval of_array_id : t -> [< Core.read_write ] tval to_array_id : [> Core.read_write ] t -> tval to_sequence_immutable : [> Core.immutable ] t -> elt Core.Sequence.tto_sequence_immutable t converts t to a sequence. Unlike to_sequence, to_sequence_immutable does not need to copy t since it is immutable.
include Core.Container.S0_permissions
with type 'perms t := 'perms t
and type elt := eltval mem : [> Core.Perms.Export.read ] t -> elt -> Base.Bool.tChecks whether the provided element is there.
val iter :
[> Core.Perms.Export.read ] t ->
f:(elt -> Base.Unit.t) @ local ->
Base.Unit.titer t ~f calls f on each element of t.
val iter_until :
[> Core.Perms.Export.read ] t ->
f:(elt -> (Base.Unit.t, 'final) Base.Container.Continue_or_stop.t) @ local ->
(finish:(Base.Unit.t -> 'final) @ local ->
'final) @ localiter_until t ~f ~finish is a short-circuiting version of iter. If f returns Stop x the computation ceases and returns x. If f always returns Continue () the final result is computed by finish.
val fold :
[> Core.Perms.Export.read ] t ->
init:'acc ->
f:('acc -> (elt -> 'acc) @ local) @ local ->
'accfold t ~init ~f returns f (... f (f (f init e1) e2) e3 ...) en, where e1..en are the elements of t
val fold_result :
[> Core.Perms.Export.read ] t ->
init:'acc ->
f:('acc -> (elt -> ('acc, 'e) Core.Result.t) @ local) @ local ->
('acc, 'e) Core.Result.tfold_result t ~init ~f is a short-circuiting version of fold that runs in the Result monad. If f returns an Error _, that value is returned without any additional invocations of f.
val fold_until :
[> Core.Perms.Export.read ] t ->
init:'acc ->
f:
('acc -> (elt -> ('acc, 'final) Base.Container.Continue_or_stop.t) @ local) @ local ->
(finish:('acc -> 'final) @ local ->
'final) @ localfold_until t ~init ~f ~finish is a short-circuiting version of fold. If f returns Stop _ the computation ceases and results in that value. If f returns Continue _, the fold will proceed. If f never returns Stop _, the final result is computed by finish.
val exists :
[> Core.Perms.Export.read ] t ->
f:(elt -> Base.Bool.t) @ local ->
Base.Bool.tReturns true if and only if there exists an element for which the provided function evaluates to true. This is a short-circuiting operation.
val for_all :
[> Core.Perms.Export.read ] t ->
f:(elt -> Base.Bool.t) @ local ->
Base.Bool.tReturns true if and only if the provided function evaluates to true for all elements. This is a short-circuiting operation.
val count :
[> Core.Perms.Export.read ] t ->
f:(elt -> Base.Bool.t) @ local ->
Base.Int.tReturns the number of elements for which the provided function evaluates to true.
val sum :
(module Base.Container.Summable with type t = 'sum) ->
[> Core.Perms.Export.read ] t ->
f:(elt -> 'sum) @ local ->
'sumReturns the sum of f i for i in the container
val find :
[> Core.Perms.Export.read ] t ->
f:(elt -> Base.Bool.t) @ local ->
elt Base.Option.tReturns as an option the first element for which f evaluates to true.
val find_map :
[> Core.Perms.Export.read ] t ->
f:(elt -> 'b Base.Option.t) @ local ->
'b Base.Option.tReturns the first evaluation of f that returns Some, and returns None if there is no such element.
val to_list : [> Core.Perms.Export.read ] t -> elt Base.List.tval to_array : [> Core.Perms.Export.read ] t -> elt Base.Array.tval min_elt :
[> Core.Perms.Export.read ] t ->
compare:(elt -> (elt -> Base.Int.t) @ local) @ local ->
elt Base.Option.tReturns a min (resp max) element from the collection using the provided compare function. In case of a tie, the first element encountered while traversing the collection is returned. The implementation uses fold so it has the same complexity as fold. Returns None iff the collection is empty.
val max_elt :
[> Core.Perms.Export.read ] t ->
compare:(elt -> (elt -> Base.Int.t) @ local) @ local ->
elt Base.Option.tinclude Core.Blit.S_permissions with type 'perms t := 'perms tval blit :
([> Core.Perms.Export.read ] t, [> Core.Perms.Export.write ] t)
Base.Blit.blitval blito :
([> Core.Perms.Export.read ] t, [> Core.Perms.Export.write ] t)
Base.Blit.blitoval unsafe_blit :
([> Core.Perms.Export.read ] t, [> Core.Perms.Export.write ] t)
Base.Blit.blitval sub :
([> Core.Perms.Export.read ] t, [< _ Core.Perms.Export.perms ] t)
Base.Blit.subval subo :
([> Core.Perms.Export.read ] t, [< _ Core.Perms.Export.perms ] t)
Base.Blit.suboinclude Core.Binary_searchable.S0_permissions
with type 'perms t := 'perms t
and type elt := eltval binary_search :
([> Core.Perms.Export.read ] t, elt, 'key)
Base.Binary_searchable.binary_searchval binary_search_segmented :
([> Core.Perms.Export.read ] t, elt)
Base.Binary_searchable.binary_search_segmentedThese functions are in Container.S1_permissions, but they are re-exposed here so that their types can be changed to make them more permissive (see comment above).
val length : _ t @ local -> intval is_empty : _ t -> boolcounterparts of regular array functions above
val set :
[> Core.write ] t @ local ->
(int ->
(float @ local ->
unit) @ local) @ localval unsafe_set :
[> Core.write ] t @ local ->
(int ->
(float @ local ->
unit) @ local) @ localval create : len:int -> elt -> [< _ Core.perms ] tval init : int -> f:(int -> elt) -> [< _ Core.perms ] tval make_matrix :
dimx:int ->
dimy:int ->
elt ->
[< _ Core.perms ] t Core.Array.tval concat : [> Core.read ] t list -> [< _ Core.perms ] tval copy : [> Core.read ] t -> [< _ Core.perms ] tval fill : [> Core.write ] t -> pos:int -> len:int -> elt -> unitval of_list : elt list -> [< _ Core.perms ] tval sort :
?pos:int ->
?len:int ->
[> Core.read_write ] t ->
compare:(elt -> elt -> int) ->
unitval stable_sort : [> Core.read_write ] t -> compare:(elt -> elt -> int) -> unitval partition_tf :
[> Core.read ] t ->
f:(elt -> bool) ->
[< _ Core.perms ] t * [< _ Core.perms ] tval partitioni_tf :
[> Core.read ] t ->
f:(int -> elt -> bool) ->
[< _ Core.perms ] t * [< _ Core.perms ] tval transpose :
[> Core.read ] t Core.Array.t ->
[< _ Core.perms ] t Core.Array.t optionval transpose_exn :
[> Core.read ] t Core.Array.t ->
[< _ Core.perms ] t Core.Array.tval filter_opt : elt option Core.Array.t -> [< _ Core.perms ] tval filter : [> Core.read ] t -> f:(elt -> bool) -> [< _ Core.perms ] tval filteri : [> Core.read ] t -> f:(int -> elt -> bool) -> [< _ Core.perms ] tval swap : [> Core.read_write ] t -> int -> int -> unitval rev_inplace : [> Core.read_write ] t -> unitval of_list_rev : elt list -> [< _ Core.perms ] tval of_list_map : elt list -> f:(elt -> elt) -> [< _ Core.perms ] tval of_list_mapi : elt list -> f:(int -> elt -> elt) -> [< _ Core.perms ] tval of_list_rev_map : elt list -> f:(elt -> elt) -> [< _ Core.perms ] tval of_list_rev_mapi : elt list -> f:(int -> elt -> elt) -> [< _ Core.perms ] tval map_inplace : [> Core.read_write ] t -> f:(elt -> elt) -> unitval permute :
?random_state:Core.Random.State.t ->
[> Core.read_write ] t ->
unitval unzip :
(elt * elt) Core.Array.t ->
[< _ Core.perms ] t * [< _ Core.perms ] tval to_sequence : [> Core.read ] t -> elt Core.Sequence.tval to_sequence_mutable : [> Core.read ] t -> elt Core.Sequence.t