package camomile
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=718f8d0222d49cf2633462231f10e08c2f09aa824f1d11ac707cdc689a378ef0
md5=ade54c020169c5c7c5563751cd79f510
doc/camomile.library/CamomileLibrary/module-type-Type/UMap/index.html
Module Type.UMap
type 'a t = 'a UMap.t
Maps over Unicode characters.
val empty : 'a t
val is_empty : 'a t -> bool
add ?eq u v m
returns the new map which is same to m
except it maps u
to some value v'
which satisfies eq v v'
. If eq
is not supplied, structural equality is used.
add ?eq u1 u2 v m
returns the new map which is same to m
except it maps characters in the range u1
-u2
to some value v'
which satisfies eq v v'
. If eq
is not supplied, structural equality is used.
remove_range u1 u2 m
removes u1
-u2
from the domain of m
from u m
restricts the domain of m
to the characters whose code points are equal or greater than u
.
after u m
restricts the domain of m
to the characters whose code points are greater than u
.
until u m
restricts the domain of m
to the characters whose code points are equal or smaller than u
.
before u m
restricts the domain of m
to the characters whose code points are smaller than u
.
iter proc m
: For each contingent region u1
-u2
that is mapped to a constant v
, proc u1 u2 v
is called. The order of call is determined by increasing order on u1
.
map ?eq f m
and mapi ?eq f m
: Similar to map
and mapi
in stdlib Map, but if the map m'
is returned, it is only guaranteed that eq (find u m') (f (find u m ))
is true for map
and eq (find u m') (f u (find u m ))
is true for mapi
. If eq
is not specified, structural equality is used.
fold_range f m x
is equivalent to f u_(2n) u_(2n+1) v_n (... (f u_1 u_2 v_1 x))
where all characters in the range u_(2k)
-u_(2k+1)
are mapped to v_k
and u_1
< u_3
< ... in code point order. For each range u_(2k)
-u_(2k+1)
is separated by a character which is not mapped to v_k
.
map_to_set p m
returns the set of characters which are mapped to values satisfying the predicate p
by m
.
val umap_of_imap : (int * int * 'a) CamomileLibrary__.AvlTree.tree -> 'a t
val imap_of_umap : 'a t -> (int * int * 'a) CamomileLibrary__.AvlTree.tree