Most of the functions in this module are a alias for the same function in Id.Dict, which can handle both 'Id.Dict' and 'Id.CounterDict'
Create a empty CounterDict
Create a 'CounterDict' with a single Id-value pair
Create a new CounterDict from a list of values and assign an Id to every value
Get the counter from a counter dict
Convert a dictionary into an list of Id-value pairs, sorted by Ids.
Covert a Id.CounterDict into a regular (Id.Dict)[Id.Dict#Dict]
Determine if a dictionary is empty.
Determine the number of Id-value pairs in the dictionary.
Determine if a Id is in a dictionary.
Get the value associated with a Id. If the Id is not found, return Nothing.
Same as get but with the arguments swapped, useful for pipelines.
Add a value to the Dictionary and assign it a new Id.
Same as as add but only returns the Dictionary
Add a list of values to the Dictionary and assign them Ids
Insert a Id-value pair into a dictionary. Replaces value when there is a collision.
Remove a Id-value pair from a dictionary. If the Id is not found, no changes are made.
Update the value of a dictionary for a specific Id with a given function. If the Id is not found, no changes are made.
Apply a function to all values in a dictionary.
Keep only the Id-value pairs that pass the given test.
Apply a function to all values in the dictionary and filter out the values that return Nothing.
Fold over the Id-value pairs in a dictionary from lowest Id to highest Id.
Get all of the Ids in a dictionary, sorted from lowest to highest.
Get all of the values in a dictionary, in the order of their Ids.
Partition a dictionary according to some test.
The first dictionary contains all Id-value pairs which passed the test, and the second contains the pairs that did not.
The first dictionary retains the Id counter while the second is turned into a Id.Dict
Keep a Id-value pair when its Id does not appear in the second dictionary.
Keep a Id-value pair when its Id appears in the second dictionary. Preference is given to values in the first dictionary.
Combine two dictionaries. If there is a collision, preference is given to the first dictionary.
Apply a function to values that appear in both dictionaries and create a new dictionary with the results, values that don't appear in all dictionaries are skipped.
Same as Id.Dict.map2 but for 3 dictionaries
Same as Id.Dict.map2 but for 4 dictionaries
Encode CounterDict to a JSON value
JSON Decoder for `SetCounterDict
A dictionary with a id counter