Dictionary_mutable.Creators3Creates a new empty dictionary.
val of_alist :
(('key * 'data) list ->
[ `Ok of ('key, 'data, 'phantom) t | `Duplicate_key of 'key ],
'key,
'data,
'phantom)
creatorDictionary containing the given key/value pairs. Fails if there are duplicate keys.
val of_alist_report_all_dups :
(('key * 'data) list ->
[ `Ok of ('key, 'data, 'phantom) t | `Duplicate_keys of 'key list ],
'key,
'data,
'phantom)
creatorLike of_alist. On failure, provides all duplicate keys instead of a single representative.
val of_alist_or_error :
(('key * 'data) list ->
('key, 'data, 'phantom) t Or_error.t,
'key,
'data,
'phantom)
creatorLike of_alist. Returns a Result.t.
val of_alist_exn :
(('key * 'data) list -> ('key, 'data, 'phantom) t, 'key, 'data, 'phantom)
creatorLike of_alist. Raises on duplicates.
val of_alist_multi :
(('key * 'data) list ->
('key, 'data list, 'phantom) t,
'key,
'data list,
'phantom)
creatorProduces a dictionary mapping each key to a list of associated values.
val create_mapped :
(get_key:('a -> 'key) ->
get_data:('a -> 'data) ->
'a list ->
[ `Ok of ('key, 'data, 'phantom) t | `Duplicate_keys of 'key list ],
'key,
'data,
'phantom)
creatorLike of_alist. Consume a list of elements for which key/value pairs can be computed.
val create_with_key :
(get_key:('data -> 'key) ->
'data list ->
[ `Ok of ('key, 'data, 'phantom) t | `Duplicate_keys of 'key list ],
'key,
'data,
'phantom)
creatorLike of_alist. Consume values for which keys can be computed.
val create_with_key_or_error :
(get_key:('data -> 'key) ->
'data list ->
('key, 'data, 'phantom) t Or_error.t,
'key,
'data,
'phantom)
creatorLike of_alist_or_error. Consume values for which keys can be computed.