= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
ON THIS PAGE
package containers
-
containers
-
containers.data
-
containers.monomorphic
-
containers.sexp
-
containers.top
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Signature
val empty : 'a t
val is_empty : _ t -> bool
update k ~f m
calls f (Some v)
if get k m = Some v
, f None
otherwise. Then, if f
returns Some v'
it binds k
to v'
, if f
returns None
it removes k
.
val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a t
add_mut ~id k v m
behaves like add k v m
, except it will mutate in place whenever possible. Changes done with an id
might affect all versions of the structure obtained with the same id
(but not other versions).
- raises Transient.Frozen
if
id
is frozen.
val remove_mut : id:Transient.t -> key -> 'a t -> 'a t
Same as remove
, but modifies in place whenever possible.
- raises Transient.Frozen
if
id
is frozen.
val update_mut :
id:Transient.t ->
key ->
f:('a option -> 'a option) ->
'a t ->
'a t
Same as update
but with mutability.
- raises Transient.Frozen
if
id
is frozen.
val cardinal : _ t -> int
Conversions
val add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a t
- raises Frozen
if the ID is frozen.
val add_seq_mut : id:Transient.t -> 'a t -> (key * 'a) sequence -> 'a t
- raises Frozen
if the ID is frozen.
val add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a t
- raises Frozen
if the ID is frozen.
IO
ON THIS PAGE