Rerouted (retagged, verified). The tag now points at a different commit than when this version was published. The Lamdera package server serves a copy recovered from https://github.com/rtfeldman/elm-sorter-experiment.
What we checked: Tag 2.1.0 now points at 76d3ee545ee4, not the published commit. Rebuilt with git archive from commit 70c636c297ef of https://github.com/rtfeldman/elm-sorter-experiment (zip prefix rtfeldman-elm-sorter-experiment-70c636c/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 a6ae57db2a43d6f13840e5b912bf0b70134eeb7b.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/rtfeldman/elm-sorter-experiment/zipball/2.1.0/
A dictionary mapping unique keys to values.
Insert, remove, and query operations all take O(log n) time.
This implementation is based on
Skinney/elm-dict-exploration,
except that it uses Sorter instead of comparable, so it permits keys
that are not comparable.
Insert a key-value pair in a dictionary. Replaces value when that key is already present.
Take all the key-value pairs in the first dictionary and
insert them into the second dictionary.
Remove a key-value pair from a dictionary. If the key is not found, no changes are made.
Update the value of a dictionary for a specific key with a given function. The given function gets the current value as a parameter and its return value determines if the value is updated or removed. New key-value pairs can be stored too.
The most general way of combining two dictionaries. You provide three accumulators for when a given key appears:
You then traverse all the keys, building up whatever you want.
The given Sorter will be used to compare the keys.
Determine if a dictionary is empty. isEmpty empty == True
Determine the number of key-value pairs in the dictionary.
Get the value associated with a key. If the key is not found, return
Nothing. This is useful when you are not sure if a key will be in the
dictionary.
animals = fromList [ ("Tom", Cat), ("Jerry", Mouse) ]
get "Tom" animals == Just Cat
get "Jerry" animals == Just Mouse
get "Spike" animals == NothingReturn True if the given key is in the given dictionary.
Check if two dictionaries are equal.
Apply a function to all values in a dictionary.
Keep a key-value pair only if it satisfies a predicate.
Remove a key-value pair if it satisfies a predicate.
Fold over the key-value pairs in a dictionary, in order from lowest key to highest key.
Fold over the key-value pairs in a dictionary, in order from highest key to lowest key.
Partition a dictionary according to a predicate. The first dictionary contains all key-value pairs which satisfy the predicate, and the second contains the rest.
Get all of the keys in a dictionary, sorted from lowest to highest. keys (fromList [(0,"Alice"),(1,"Bob")]) == [0,1]
Get all of the values in a dictionary, in the order of their keys. values (fromList [(0,"Alice"),(1,"Bob")]) == ["Alice", "Bob"]
Convert a dictionary into an association list of key-value pairs, sorted by keys.
A dictionary of keys and values. So a
(Dict String User)is a dictionary that lets you look up aString(such as user names) and find the associatedUser.