[{"name":"IxDict","comment":" A Dict data structure that derives keys from values. The keys can be any comparable\ntype. This includes `Int`, `Float`, `Time`, `Char`, `String`, and tuples or\nlists of comparable types.\nSince it uses the underlying core/Dict module, insert, remove, and query operations all take _O(log n)_ time.\n\n\n# Indexed Dictionaries\n\n@docs IxDict\n\n\n# Create\n\n@docs toDict, fromListBy, fromDictBy, empty, singleton\n\n\n# Manipulate\n\n@docs insert, remove\n\n\n# Query\n\n@docs isEmpty, member, memberByIx, memberExact, get, size\n\n\n# Lists\n\n@docs keys, values, toList\n\n\n# Transform\n\n@docs map, mapWith, foldl, foldr, filter, keep, reject, partition\n\n\n# Combine\n\n@docs union, intersect, diff\n\n\n# Convenience\n\n@docs emptyFromTuple, emptyFromId, singletonFromTuple, singletonFromId\n\n","unions":[{"name":"IxDict","comment":" A dictionary of keys and values wrapped with a keyFn `(v -> k)` to derive\nkeys from that dictionary.\n","args":["k","v"],"cases":[]}],"aliases":[],"values":[{"name":"diff","comment":" Keep a key-value pair when its key does not appear in the second indexed dictionary.\n","type":"IxDict.IxDict comparable v -> IxDict.IxDict comparable v -> IxDict.IxDict comparable v"},{"name":"empty","comment":" Create an empty indexed dictionary using a keyFn\n","type":"(v -> comparable) -> IxDict.IxDict comparable v"},{"name":"emptyFromId","comment":" Uses .id as keyFn\n","type":"IxDict.IxDict comparable { a | id : comparable }"},{"name":"emptyFromTuple","comment":" Uses Tuple.first as keyFn\n","type":"IxDict.IxDict comparable ( comparable, b )"},{"name":"filter","comment":" Filter... use `keep` or `reject` instead.\n\nBecause, what does it filter? Do you want the filtered product like coffee\n(in this case, use reject) or the remaining good part like gold pannig (in this\ncase, use keep)\n\n","type":"Basics.Never -> a"},{"name":"foldl","comment":" Fold over the key-value pairs in an indexed dictionary from lowest key to highest key.\n","type":"(k -> v -> b -> b) -> b -> IxDict.IxDict k v -> b"},{"name":"foldr","comment":" Fold over the key-value pairs in an indexed dictionary from highest key to lowest key.\n","type":"(k -> v -> b -> b) -> b -> IxDict.IxDict k v -> b"},{"name":"fromDictBy","comment":" Create an indexed dictionary from a normal dictionary by providing a key fn.\nEsentially gets the dict values and uses fromListBy:\n\n    fromDictBy : (v -> comparable) -> Dict k v -> IxDict comparable v\n    fromDictBy keyFn =\n        fromListBy keyFn << Dict.values\n\nSee `fromListBy` on how to use it.\n\n","type":"(v -> comparable) -> Dict.Dict k v -> IxDict.IxDict comparable v"},{"name":"fromListBy","comment":" Create an indexed dictionary from list by providing a key fn.\n\n    users : IxDict.IxDict String User\n    users =\n        IxDict.fromListBy .id\n            [ User \"alice\" \"Alice\"\n            , User \"bob\" \"Bob\"\n            ]\n\n    type alias User =\n        { id : String, name : String }\n\n    updated : IxDict.IxDict String User\n    updated =\n        users\n            |> IxDict.insert (User \"charlie\" \"Charlie\")\n            |> IxDict.remove \"bob\"\n\n","type":"(v -> comparable) -> List.List v -> IxDict.IxDict comparable v"},{"name":"get","comment":" Get the value associated with a key.\n","type":"comparable -> IxDict.IxDict comparable v -> Maybe.Maybe v"},{"name":"insert","comment":" Insert a value into an indexed dictionary. Replaces value when there is\na collision.\n","type":"v -> IxDict.IxDict comparable v -> IxDict.IxDict comparable v"},{"name":"intersect","comment":" Keep a key-value pair when its key appears in the second indexed dictionary. Preference is given to values in the first indexed dictionary.\n","type":"IxDict.IxDict comparable v -> IxDict.IxDict comparable v -> IxDict.IxDict comparable v"},{"name":"isEmpty","comment":" Determine if a dictionary is empty.\n","type":"IxDict.IxDict k v -> Basics.Bool"},{"name":"keep","comment":" Keep only the key-value pairs that pass the given test.\n","type":"(comparable -> v -> Basics.Bool) -> IxDict.IxDict comparable v -> IxDict.IxDict comparable v"},{"name":"keys","comment":" Get all of the keys in a dictionary, sorted from lowest to highest.\n","type":"IxDict.IxDict k v -> List.List k"},{"name":"map","comment":" Map a function onto a ixDict, creating a new ixDict with no duplicates.\n\nThis operation is not structure-preserving for sets, so is not a valid Functor. An example case: mapping const x over a ixDict with n > 0 elements will result in a ixDict with one element.\n\n","type":"(comparable -> b -> b) -> IxDict.IxDict comparable b -> IxDict.IxDict comparable b"},{"name":"mapWith","comment":" Transform values and rebuild the dict with a new keyFn\n","type":"(b -> comparable) -> (comparable -> a -> b) -> IxDict.IxDict comparable a -> IxDict.IxDict comparable b"},{"name":"member","comment":" Determine if a key is in a dictionary.\n","type":"comparable -> IxDict.IxDict comparable v -> Basics.Bool"},{"name":"memberByIx","comment":" Determine if a value is in a dictionary, only by comparing keys.\n","type":"v -> IxDict.IxDict comparable v -> Basics.Bool"},{"name":"memberExact","comment":" Determine if a value is structually in a dictionary.\n","type":"v -> IxDict.IxDict comparable v -> Basics.Bool"},{"name":"partition","comment":" Partition an indexed dictionary according to some test. The first dictionary contains all key-value pairs which passed the test, and the second contains the pairs that did not.\n","type":"(comparable -> v -> Basics.Bool) -> IxDict.IxDict comparable v -> ( IxDict.IxDict comparable v, IxDict.IxDict comparable v )"},{"name":"reject","comment":" Reject all key-value pairs that for a given test\n","type":"(comparable -> v -> Basics.Bool) -> IxDict.IxDict comparable v -> IxDict.IxDict comparable v"},{"name":"remove","comment":" Remove a key-value pair from the dictionary. If the key is not found, no changes are made.\n","type":"comparable -> IxDict.IxDict comparable v -> IxDict.IxDict comparable v"},{"name":"singleton","comment":" Create a dictionary with one key-value pair and a keyFn\n","type":"(v -> comparable) -> v -> IxDict.IxDict comparable v"},{"name":"singletonFromId","comment":" Uses .id as keyFn\n","type":"{ a | id : comparable } -> IxDict.IxDict comparable { a | id : comparable }"},{"name":"singletonFromTuple","comment":" Uses Tuple.first as keyFn\n","type":"( comparable, b ) -> IxDict.IxDict comparable ( comparable, b )"},{"name":"size","comment":" Determine the number of key-value pairs in the dictionary.\n","type":"IxDict.IxDict k v -> Basics.Int"},{"name":"toDict","comment":" Convert an indexed dictionary into a normal dictionary\n","type":"IxDict.IxDict k v -> Dict.Dict k v"},{"name":"toList","comment":" Convert a dictionary into an association list of key-value pairs, sorted by keys.\n","type":"IxDict.IxDict k v -> List.List ( k, v )"},{"name":"union","comment":" Combine two indexed dictionaries. If there is a collision, preference is given to the first indexed dictionary.\n","type":"IxDict.IxDict comparable v -> IxDict.IxDict comparable v -> IxDict.IxDict comparable v"},{"name":"values","comment":" Get all of the values in a dictionary, in the order of their keys.\n","type":"IxDict.IxDict k v -> List.List v"}],"binops":[]}]