Dictionary_immutable.Creators2Dictionary with a single key/value pair.
val of_alist :
(('key * 'data) list ->
[ `Ok of ('key, 'data) t | `Duplicate_key of 'key ],
'key,
'data)
creatorDictionary containing the given key/value pairs. Fails if there are duplicate keys.
val of_alist_or_error :
(('key * 'data) list -> ('key, 'data) t Or_error.t, 'key, 'data) creatorLike of_alist. Returns a Result.t.
Like of_alist. Raises on duplicates.
Produces a dictionary mapping each key to a list of associated values.
val of_alist_fold :
(('key * 'data) list ->
init:'acc ->
f:('acc -> 'data -> 'acc) ->
('key, 'acc) t,
'key,
'data)
creatorProduces a dictionary using each key/value pair. Combines all values for a given key with init using f.
val of_alist_reduce :
(('key * 'data) list ->
f:('data -> 'data -> 'data) ->
('key, 'data) t,
'key,
'data)
creatorProduces a dictionary using each key/value pair. Combines multiple values for a given key using f.
val of_sequence :
(('key * 'data) Sequence.t ->
[ `Ok of ('key, 'data) t | `Duplicate_key of 'key ],
'key,
'data)
creatorLike of_alist. Consumes a sequence.
val of_sequence_or_error :
(('key * 'data) Sequence.t -> ('key, 'data) t Or_error.t, 'key, 'data)
creatorLike of_alist_or_error. Consumes a sequence.
val of_sequence_exn :
(('key * 'data) Sequence.t -> ('key, 'data) t, 'key, 'data) creatorLike of_alist_exn. Consumes a sequence.
val of_sequence_multi :
(('key * 'data) Sequence.t -> ('key, 'data list) t, 'key, 'data) creatorLike of_alist_multi. Consumes a sequence.
val of_sequence_fold :
(('key * 'data) Sequence.t ->
init:'c ->
f:('c -> 'data -> 'c) ->
('key, 'c) t,
'key,
'data)
creatorLike of_alist_fold. Consumes a sequence.
val of_sequence_reduce :
(('key * 'data) Sequence.t ->
f:('data -> 'data -> 'data) ->
('key, 'data) t,
'key,
'data)
creatorLike of_alist_reduce. Consumes a sequence.
val of_list_with_key :
('data list ->
get_key:('data -> 'key) ->
[ `Ok of ('key, 'data) t | `Duplicate_key of 'key ],
'key,
'data)
creatorLike of_alist. Consume values for which keys can be computed.
val of_list_with_key_or_error :
('data list ->
get_key:('data -> 'key) ->
('key, 'data) t Or_error.t,
'key,
'data)
creatorLike of_alist_or_error. Consume values for which keys can be computed.
val of_list_with_key_exn :
('data list -> get_key:('data -> 'key) -> ('key, 'data) t, 'key, 'data)
creatorLike of_alist_exn. Consume values for which keys can be computed.
val of_list_with_key_multi :
('data list -> get_key:('data -> 'key) -> ('key, 'data list) t, 'key, 'data)
creatorLike of_alist_multi. Consume values for which keys can be computed.