[{"name":"SeqDict","comment":" A dictionary mapping unique keys to values where insertion order is preserved for functions like foldl and toList.\n\n\n# Seq Dictionary\n\n@docs SeqDict\n\n\n# Build\n\n@docs empty, singleton, insert, update, updateIfExists, remove\n\n\n# Query\n\n@docs get, isEmpty, member, size, unorderedEquals\n\n\n# Combine\n\n@docs union, intersect, diff, merge\n\n\n# Lists\n\n@docs toList, fromList, keys, values\n\n\n# Transform\n\n@docs foldl, foldr, map, filter, filterMap, partition\n\n\n# Internal\n\n@docs encodeDict, decodeDict\n\n","unions":[{"name":"SeqDict","comment":" A dictionary of keys and values. So a `(Dict String User)` is a dictionary\nthat lets you look up a `String` (such as user names) and find the associated\n`User`.\n\nThis implementation differs from the one in core in that keys don't have to\nbe comparable, and that operations like foldl and foldr iterates the key-value\npairs in insertion order instead of sorted order.\n\n","args":["k","v"],"cases":[]}],"aliases":[],"values":[{"name":"decodeDict","comment":" The Lamdera compiler relies on this function, it is not intended to be used directly. Vendor this function in your own codebase if you want to use it, as the encoding can change without notice.\n","type":"Lamdera.Wire3.Decoder k -> Lamdera.Wire3.Decoder value -> Lamdera.Wire3.Decoder (SeqDict.SeqDict k value)"},{"name":"diff","comment":" Keep a key-value pair when its key does not appear in the second Dictionary.\n","type":"SeqDict.SeqDict k v -> SeqDict.SeqDict k v1 -> SeqDict.SeqDict k v"},{"name":"empty","comment":" The empty dictionary.\n","type":"SeqDict.SeqDict k v"},{"name":"encodeDict","comment":" The Lamdera compiler relies on this function, it is not intended to be used directly. Vendor this function in your own codebase if you want to use it, as the encoding can change without notice.\n","type":"(key -> Lamdera.Wire3.Encoder) -> (value -> Lamdera.Wire3.Encoder) -> SeqDict.SeqDict key value -> Lamdera.Wire3.Encoder"},{"name":"filter","comment":" Keep a key-value pair when it satisfies a predicate.\n","type":"(k -> v -> Basics.Bool) -> SeqDict.SeqDict k v -> SeqDict.SeqDict k v"},{"name":"filterMap","comment":" Filter out certain key-value pairs while also mapping over the values.\n","type":"(k -> v -> Maybe.Maybe v2) -> SeqDict.SeqDict k v -> SeqDict.SeqDict k v2"},{"name":"foldl","comment":" Fold over the key-value pairs in a dictionary in the order the key was\nfirst inserted.\n","type":"(k -> v -> b -> b) -> b -> SeqDict.SeqDict k v -> b"},{"name":"foldr","comment":" Fold over the key-value pairs in a dictionary in the reverse order the key\nwas first inserted.\n","type":"(k -> v -> b -> b) -> b -> SeqDict.SeqDict k v -> b"},{"name":"fromList","comment":" Convert an association list into a dictionary.\n","type":"List.List ( k, v ) -> SeqDict.SeqDict k v"},{"name":"get","comment":" Get the value associated with a key. If the key is not found, return\n`Nothing`. This is useful when you are not sure if a key will be in the\ndictionary.\n\n    animals = fromList [ (\"Tom\", Cat), (\"Jerry\", Mouse) ]\n\n    get \"Tom\"   animals == Just Cat\n    get \"Jerry\" animals == Just Mouse\n    get \"Spike\" animals == Nothing\n\n","type":"k -> SeqDict.SeqDict k v -> Maybe.Maybe v"},{"name":"insert","comment":" Insert a key-value pair into the dictionary. Replaces value when there is\na collision.\n","type":"k -> v -> SeqDict.SeqDict k v -> SeqDict.SeqDict k v"},{"name":"intersect","comment":" Keep a key-value pair when its key appears in the second Dictionary.\nPreference is given to values in the first Dictionary.\n","type":"SeqDict.SeqDict k v -> SeqDict.SeqDict k v1 -> SeqDict.SeqDict k v"},{"name":"isEmpty","comment":" Determine if a dictionary is empty.\n\n    isEmpty empty == True\n\n","type":"SeqDict.SeqDict k v -> Basics.Bool"},{"name":"keys","comment":" Get all of the keys in a dictionary.\n\n       keys (fromList [(0,\"Alice\"),(1,\"Bob\")]) == [0,1]\n\n","type":"SeqDict.SeqDict k v -> List.List k"},{"name":"map","comment":" Apply a function to all values in a dictionary.\n","type":"(k -> a -> b) -> SeqDict.SeqDict k a -> SeqDict.SeqDict k b"},{"name":"member","comment":" Determine if a key is in a dictionary.\n","type":"k -> SeqDict.SeqDict k v -> Basics.Bool"},{"name":"merge","comment":" The most general way of combining two dictionaries. You provide three\naccumulators for when a given key appears:\n\n1.  Only in the left dictionary.\n2.  In both dictionaries.\n3.  Only in the right dictionary.\n\nYou then traverse all the keys by insertion order, starting with the left\ndictionary and then the right dictionary (keys that appear in both are\nskipped for the right dictionary)\n\n","type":"(k -> a -> result -> result) -> (k -> a -> b -> result -> result) -> (k -> b -> result -> result) -> SeqDict.SeqDict k a -> SeqDict.SeqDict k b -> result -> result"},{"name":"partition","comment":" Partition a dictionary according to a predicate. The first dictionary\ncontains all key-value pairs which satisfy the predicate, and the second\ncontains the rest.\n","type":"(k -> v -> Basics.Bool) -> SeqDict.SeqDict k v -> ( SeqDict.SeqDict k v, SeqDict.SeqDict k v )"},{"name":"remove","comment":" Remove a key-value pair from a dictionary. If the key is not found,\nno changes are made.\n","type":"k -> SeqDict.SeqDict k v -> SeqDict.SeqDict k v"},{"name":"singleton","comment":" Create a dictionary with one key-value pair.\n","type":"k -> v -> SeqDict.SeqDict k v"},{"name":"size","comment":" Determine the number of key-value pairs in the dictionary.\n","type":"SeqDict.SeqDict k v -> Basics.Int"},{"name":"toList","comment":" Convert a dictionary into an association list of key-value pairs.\n","type":"SeqDict.SeqDict k v -> List.List ( k, v )"},{"name":"union","comment":" Combine two dictionaries. If there is a collision, preference is given\nto the first dictionary.\n","type":"SeqDict.SeqDict k v -> SeqDict.SeqDict k v -> SeqDict.SeqDict k v"},{"name":"unorderedEquals","comment":" Check if two dictionaries are equal regardless what order items were inserted.\nNote that this is not the same as writing `dict1 == dict2`. Insertion order matters when using `==`.\n\n    dict1 = SeqDict.fromList [ ( \"A\", 1 ), ( \"B\", 2 ) ]\n    dict2 = SeqDict.fromList [ ( \"B\", 2 ), ( \"A\", 1 ) ]\n\n    SeqDict.unorderedEquals dict1 dict2 -- True\n    dict1 == dict2 -- False\n\n","type":"SeqDict.SeqDict k v -> SeqDict.SeqDict k v -> Basics.Bool"},{"name":"update","comment":" Update the value of a dictionary for a specific key with a given function.\nThe given function gets the current value as a parameter and its return value\ndetermines if the value is updated or removed. New key-value pairs can be\ninserted too.\n","type":"k -> (Maybe.Maybe v -> Maybe.Maybe v) -> SeqDict.SeqDict k v -> SeqDict.SeqDict k v"},{"name":"updateIfExists","comment":" Update the value of a dictionary _only_ if the specified key is present in the dictionary.\n","type":"k -> (v -> v) -> SeqDict.SeqDict k v -> SeqDict.SeqDict k v"},{"name":"values","comment":" Get all of the values in a dictionary as a List.\n\n       values (fromList [(0,\"Alice\"),(1,\"Bob\")]) == [\"Alice\", \"Bob\"]\n\n","type":"SeqDict.SeqDict k v -> List.List v"}],"binops":[]},{"name":"SeqSet","comment":" A set of unique values.\n\n\n# Sets\n\n@docs SeqSet\n\n\n# Build\n\n@docs empty, singleton, insert, remove\n\n\n# Query\n\n@docs isEmpty, member, size, unorderedEquals\n\n\n# Combine\n\n@docs union, intersect, diff\n\n\n# Lists\n\n@docs toList, fromList\n\n\n# Transform\n\n@docs map, foldl, foldr, filter, partition\n\n\n# Internal\n\n@docs encodeSet, decodeSet\n\n","unions":[{"name":"SeqSet","comment":" Represents a set of unique values. So `(Set Int)` is a set of integers and\n`(Set String)` is a set of strings.\n","args":["a"],"cases":[]}],"aliases":[],"values":[{"name":"decodeSet","comment":" The Lamdera compiler relies on this function, it is not intended to be used directly. Vendor this function in your own codebase if you want to use it, as the encoding can change without notice.\n","type":"Lamdera.Wire3.Decoder k -> Lamdera.Wire3.Decoder (SeqSet.SeqSet k)"},{"name":"diff","comment":" Get the difference between the first set and the second. Keeps values\nthat do not appear in the second set.\n","type":"SeqSet.SeqSet a -> SeqSet.SeqSet a -> SeqSet.SeqSet a"},{"name":"empty","comment":" Create an empty set.\n","type":"SeqSet.SeqSet a"},{"name":"encodeSet","comment":" The Lamdera compiler relies on this function, it is not intended to be used directly. Vendor this function in your own codebase if you want to use it, as the encoding can change without notice.\n","type":"(value -> Lamdera.Wire3.Encoder) -> SeqSet.SeqSet value -> Lamdera.Wire3.Encoder"},{"name":"filter","comment":" Create a new set consisting only of elements which satisfy a predicate.\n","type":"(a -> Basics.Bool) -> SeqSet.SeqSet a -> SeqSet.SeqSet a"},{"name":"foldl","comment":" Fold over the values in a set.\n","type":"(a -> b -> b) -> b -> SeqSet.SeqSet a -> b"},{"name":"foldr","comment":" Fold over the values in a set.\n","type":"(a -> b -> b) -> b -> SeqSet.SeqSet a -> b"},{"name":"fromList","comment":" Convert a list into a set, removing any duplicates.\n","type":"List.List a -> SeqSet.SeqSet a"},{"name":"insert","comment":" Insert a value into a set.\n","type":"a -> SeqSet.SeqSet a -> SeqSet.SeqSet a"},{"name":"intersect","comment":" Get the intersection of two sets. Keeps values that appear in both sets.\n","type":"SeqSet.SeqSet a -> SeqSet.SeqSet a -> SeqSet.SeqSet a"},{"name":"isEmpty","comment":" Determine if a set is empty.\n","type":"SeqSet.SeqSet a -> Basics.Bool"},{"name":"map","comment":" Map a function onto a set, creating a new set with no duplicates.\n","type":"(a -> b) -> SeqSet.SeqSet a -> SeqSet.SeqSet b"},{"name":"member","comment":" Determine if a value is in a set.\n","type":"a -> SeqSet.SeqSet a -> Basics.Bool"},{"name":"partition","comment":" Create two new sets; the first consisting of elements which satisfy a\npredicate, the second consisting of elements which do not.\n","type":"(a -> Basics.Bool) -> SeqSet.SeqSet a -> ( SeqSet.SeqSet a, SeqSet.SeqSet a )"},{"name":"remove","comment":" Remove a value from a set. If the value is not found, no changes are made.\n","type":"a -> SeqSet.SeqSet a -> SeqSet.SeqSet a"},{"name":"singleton","comment":" Create a set with one value.\n","type":"a -> SeqSet.SeqSet a"},{"name":"size","comment":" Determine the number of elements in a set.\n","type":"SeqSet.SeqSet a -> Basics.Int"},{"name":"toList","comment":" Convert a set into a list.\n","type":"SeqSet.SeqSet a -> List.List a"},{"name":"union","comment":" Get the union of two sets. Keep all values.\n","type":"SeqSet.SeqSet a -> SeqSet.SeqSet a -> SeqSet.SeqSet a"},{"name":"unorderedEquals","comment":" Check if two sets are equal regardless what order items were inserted.\nNote that this is not the same as writing `set1 == set2`. Insertion order matters when using `==`.\n\n    set1 = SeqSet.fromList [ ( \"A\", 1 ), ( \"B\", 2 ) ]\n    set2 = SeqSet.fromList [ ( \"B\", 2 ), ( \"A\", 1 ) ]\n\n    SeqSet.unorderedEquals set1 set2 -- True\n    set1 == set2 -- False\n\n","type":"SeqSet.SeqSet k -> SeqSet.SeqSet k -> Basics.Bool"}],"binops":[]}]