| Value | Description |
val add : 'key -> 'a -> Map <'key,'a> -> Map <'key,'a> |
Return a new map with the binding added to the given map.
|
val empty : Map <'key,'a> |
The empty map
|
val find : 'key -> Map <'key,'a> -> 'a |
Lookup an element in the map, raising [[Not_found]]/[[IndexOutOfRangeException]] if no binding
exists in the map.
|
val first : ('key -> 'a -> 'b option) -> Map <'key,'a> -> 'b option |
Search the map looking for the first element where the fiven function returns a [[Some]] value
|
val fold : ('key -> 'a -> 'c -> 'c) -> Map <'key,'a> -> 'c -> 'c |
Fold over the bindings in the map
|
val iter : ('key -> 'a -> unit) -> Map <'key,'a> -> unit |
Apply the given function to each binding in the dictionary
|
val Make : ('key -> 'key -> int) -> CMapOps <'key,'a> |
A functor to build a collection of operations for creating and using
maps based on the given comparison function.
This returns a record that contains the functions you use to create and manipulate maps of
this kind. (The returned value is a lot like an ML module, except
it is a record in the core language.) You should create a new
component for each pair of key/value types.
Language restrictions related to polymorphism may mean you
have to create a new instantiation of Map.Make for each toplevel
key/value type pair.
|
val map : ('a -> 'b) -> Map <'key,'a> -> Map <'key,'b> |
Build a new collection whose elements are the results of applying the given function
to each of the elements of the collection.
|
val mapi : ('key -> 'a -> 'b) -> Map <'key,'a> -> Map <'key,'b> |
Build a new collection whose elements are the results of applying the given function
to each of the elements of the collection. The integer index passed to the
function indicates the index of element being transformed.
|
val mem : 'key -> Map <'key,'a> -> bool |
Test is an element is in the domain of the map
|
val remove : 'key -> Map <'key,'a> -> Map <'key,'a> |
Remove an element from the domain of the map. No exception is raised if the element is not present.
|
val tryfind : 'key -> Map <'key,'a> -> 'a option |
Lookup an element in the map, returning a [[Some]] value if the element is in the domain
of the map and [[None]] if not.
|