[{"name":"DictAny","comment":" A dictionary mapping unique keys to values. Keys can be any type.\n\nA comparison function `k -> k -> Order` is used to compare keys, this should uniquely identify keys.\n\nInsert, remove, and query operations all take _O(log n)_ time.\n\n\n# Dictionaries\n\n@docs Dict\n\n\n# Build\n\n@docs empty, singleton, insert, update, remove\n\n\n# Query\n\n@docs isEmpty, member, get, size\n\n\n# Lists\n\n@docs keys, values, toList, fromList\n\n\n# Transform\n\n@docs map, foldl, foldr, filter, partition\n\n\n# Combine\n\n@docs union, intersect, diff, merge\n\n","unions":[{"name":"Dict","comment":" A dictionary of keys and values. So a `Dict Key Value` is a dictionary\nthat lets you look up a unique Key and find the associated Value.\n\n    import DictAny as Dict exposing (Dict)\n\n    type ID\n        = ID Int\n\n    comparer : ID -> ID -> Order\n    comparer (ID a) (ID b) =\n        compare a b\n\n    type alias Museum =\n        { name : String, rating : Int }\n\n    museums : Dict ID Museum\n    museums =\n        [ ( ID 1, { name = \"Natural History\", rating = 4 } )\n        , ( ID 8, { name = \"Tate Modern\", rating = 3 } )\n        , ( ID 42, { name = \"Science\", rating = 5 } )\n        ]\n            |> Dict.fromList comparer\n\n    museums |> Dict.get comparer (ID 42)\n        --> Just { name = \"Science\", rating = 5 }\n\n","args":["k","v"],"cases":[]}],"aliases":[],"values":[{"name":"diff","comment":" Keep a key-value pair when its key does not appear in the second dictionary.\n","type":"(k -> k -> Basics.Order) -> DictAny.Dict k a -> DictAny.Dict k b -> DictAny.Dict k a"},{"name":"empty","comment":" Create an empty dictionary.\n","type":"DictAny.Dict k v"},{"name":"filter","comment":" Keep only the key-value pairs that pass the given test.\n","type":"(k -> k -> Basics.Order) -> (k -> v -> Basics.Bool) -> DictAny.Dict k v -> DictAny.Dict k v"},{"name":"foldl","comment":" Fold over the key-value pairs in a dictionary from lowest key to highest key.\n\n    import DictAny as Dict exposing (Dict)\n\n    type alias User = { age : Int }\n\n    getAges : Dict String User -> List Int\n    getAges dict =\n        dict |> Dict.foldl consAge []\n\n    consAge : String -> User -> List Int -> List Int\n    consAge _ user ages =\n        user.age :: ages\n\n    users : Dict String User\n    users =\n        [ (\"Fred\", {age=33})\n        , (\"Bert\", {age=19})\n        , (\"Adam\", {age=42})\n        ] |> Dict.fromList compare\n\n    getAges users --> [33,19,42]\n\n","type":"(k -> v -> b -> b) -> b -> DictAny.Dict k v -> b"},{"name":"foldr","comment":" Fold over the key-value pairs in a dictionary from highest key to lowest key.\n\n    import DictAny as Dict exposing (Dict)\n\n    type alias User = { age : Int }\n\n    getAges : Dict String User -> List Int\n    getAges dict =\n        dict |> Dict.foldr consAge []\n\n    consAge : String -> User -> List Int -> List Int\n    consAge _ user ages =\n        user.age :: ages\n\n    users : Dict String User\n    users =\n        [ (\"Fred\", {age=33})\n        , (\"Bert\", {age=19})\n        , (\"Adam\", {age=42})\n        ] |> Dict.fromList compare\n\n    getAges users -->  [42,19,33]\n\n","type":"(k -> v -> b -> b) -> b -> DictAny.Dict k v -> b"},{"name":"fromList","comment":" Convert an association list into a dictionary.\n","type":"(k -> k -> Basics.Order) -> List.List ( k, v ) -> DictAny.Dict 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    import DictAny as Dict exposing (Dict)\n\n    type Animal = Cat | Dog | Mouse\n\n    animalToInt : Animal -> Int\n    animalToInt animal =\n        case animal of\n            Cat -> 0\n            Dog -> 1\n            Mouse -> 2\n\n    comparer : Animal -> Animal -> Order\n    comparer a b = compare (animalToInt a) (animalToInt b)\n\n    animals : Dict Animal String\n    animals = [ (Cat, \"Tom\"), (Mouse, \"Jerry\") ]\n                    |> fromList comparer\n\n    animals |> Dict.get comparer Cat --> Just \"Tom\"\n    animals |> Dict.get comparer Dog --> Nothing\n    animals |> Dict.get comparer Mouse --> Just \"Jerry\"\n\n","type":"(k -> k -> Basics.Order) -> k -> DictAny.Dict k v -> Maybe.Maybe v"},{"name":"insert","comment":" Insert a key-value pair into a dictionary. Replaces value when there is\na collision.\n","type":"(k -> k -> Basics.Order) -> k -> v -> DictAny.Dict k v -> DictAny.Dict 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":"(k -> k -> Basics.Order) -> DictAny.Dict k v -> DictAny.Dict k v -> DictAny.Dict k v"},{"name":"isEmpty","comment":" Determine if a dictionary is empty.\n\n    isEmpty empty == True\n\n","type":"DictAny.Dict k v -> Basics.Bool"},{"name":"keys","comment":" Get all of the keys in a dictionary, sorted from lowest to highest.\n\n    keys (fromList compare [ ( 0, \"Alice\" ), ( 1, \"Bob\" ) ])\n        --> [0,1]\n\n","type":"DictAny.Dict k v -> List.List k"},{"name":"map","comment":" Apply a function to all values in a dictionary.\n","type":"(k -> a -> b) -> DictAny.Dict k a -> DictAny.Dict k b"},{"name":"member","comment":" Determine if a key is in a dictionary.\n","type":"(k -> k -> Basics.Order) -> k -> DictAny.Dict 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 from lowest to highest, building up whatever\nyou want.\n\n","type":"(k -> k -> Basics.Order) -> (k -> a -> result -> result) -> (k -> a -> b -> result -> result) -> (k -> b -> result -> result) -> DictAny.Dict k a -> DictAny.Dict k b -> result -> result"},{"name":"partition","comment":" Partition a dictionary according to some test. The first dictionary\ncontains all key-value pairs which passed the test, and the second contains\nthe pairs that did not.\n","type":"(k -> k -> Basics.Order) -> (k -> v -> Basics.Bool) -> DictAny.Dict k v -> ( DictAny.Dict k v, DictAny.Dict 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 -> k -> Basics.Order) -> k -> DictAny.Dict k v -> DictAny.Dict k v"},{"name":"singleton","comment":" Create a dictionary with one key-value pair.\n","type":"k -> v -> DictAny.Dict k v"},{"name":"size","comment":" Determine the number of key-value pairs in the dictionary.\n","type":"DictAny.Dict k v -> Basics.Int"},{"name":"toList","comment":" Convert a dictionary into an association list of key-value pairs, sorted by keys.\n","type":"DictAny.Dict 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":"(k -> k -> Basics.Order) -> DictAny.Dict k v -> DictAny.Dict k v -> DictAny.Dict k v"},{"name":"update","comment":" Update the value of a dictionary for a specific key with a given function.\n","type":"(k -> k -> Basics.Order) -> k -> (Maybe.Maybe v -> Maybe.Maybe v) -> DictAny.Dict k v -> DictAny.Dict k v"},{"name":"values","comment":" Get all of the values in a dictionary, in the order of their keys.\n\n    values\n        (fromList compare [ ( 0, \"Alice\" ), ( 1, \"Bob\" ) ])\n            --> [\"Alice\", \"Bob\"]\n\n","type":"DictAny.Dict k v -> List.List v"}],"binops":[]},{"name":"SetAny","comment":" A set of values unique according to a comparison function. Values can be any type.\n\nA comparison function `a -> a -> Order` is used to compare values, this should uniquely identify values.\n\nInsert, remove, and query operations all take _O(log n)_ time.\n\n\n# Sets\n\n@docs Set\n\n\n# Build\n\n@docs empty, singleton, insert, remove\n\n\n# Query\n\n@docs isEmpty, member, size\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","unions":[{"name":"Set","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\n    import SetAny as Set exposing (Set)\n\n    items : Set Item\n    items = [ Brush, Soap, Towel ] |> Set.fromList comparer\n\n    type Item\n        = Brush\n        | Soap\n        | Shampoo\n        | Towel\n\n    itemToInt : Item -> Int\n    itemToInt item =\n        case item of\n            Brush -> 1\n            Soap -> 2\n            Shampoo -> 3\n            Towel -> 42\n\n    comparer : Item -> Item -> Order\n    comparer a b = compare (itemToInt a) (itemToInt b)\n\n    items |> Set.member comparer Shampoo --> False\n    items |> Set.member comparer Towel  --> True\n    items |> Set.toList --> [ Brush, Soap, Towel ]\n\n","args":["a"],"cases":[]}],"aliases":[],"values":[{"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":"(a -> a -> Basics.Order) -> SetAny.Set a -> SetAny.Set a -> SetAny.Set a"},{"name":"empty","comment":" Create an empty set.\n","type":"SetAny.Set a"},{"name":"filter","comment":" Only keep elements that pass the given test.\n\n    import SetAny as Set exposing (Set)\n\n    numbers : Set Int\n    numbers =\n        [ -2, -1, 0, 1, 2 ] |> Set.fromList compare\n\n    positives : Set Int\n    positives =\n        numbers |> Set.filter compare (\\x -> x > 0)\n\n    positives --> [1,2] |> Set.fromList compare\n\n","type":"(a -> a -> Basics.Order) -> (a -> Basics.Bool) -> SetAny.Set a -> SetAny.Set a"},{"name":"foldl","comment":" Fold over the values in a set, in order from lowest to highest.\n","type":"(a -> b -> b) -> b -> SetAny.Set a -> b"},{"name":"foldr","comment":" Fold over the values in a set, in order from highest to lowest.\n","type":"(a -> b -> b) -> b -> SetAny.Set a -> b"},{"name":"fromList","comment":" Convert a list into a set, removing any duplicates.\n","type":"(a -> a -> Basics.Order) -> List.List a -> SetAny.Set a"},{"name":"insert","comment":" Insert a value into a set.\n","type":"(a -> a -> Basics.Order) -> a -> SetAny.Set a -> SetAny.Set a"},{"name":"intersect","comment":" Get the intersection of two sets. Keeps values that appear in both sets.\n","type":"(a -> a -> Basics.Order) -> SetAny.Set a -> SetAny.Set a -> SetAny.Set a"},{"name":"isEmpty","comment":" Determine if a set is empty.\n","type":"SetAny.Set a -> Basics.Bool"},{"name":"map","comment":" Map a function onto a set, creating a new set with no duplicates.\n","type":"(b -> b -> Basics.Order) -> (a -> b) -> SetAny.Set a -> SetAny.Set b"},{"name":"member","comment":" Determine if a value is in a set.\n","type":"(a -> a -> Basics.Order) -> a -> SetAny.Set a -> Basics.Bool"},{"name":"partition","comment":" Create two new sets. The first contains all the elements that passed the\ngiven test, and the second contains all the elements that did not.\n","type":"(a -> a -> Basics.Order) -> (a -> Basics.Bool) -> SetAny.Set a -> ( SetAny.Set a, SetAny.Set a )"},{"name":"remove","comment":" Remove a value from a set. If the value is not found, no changes are made.\n","type":"(a -> a -> Basics.Order) -> a -> SetAny.Set a -> SetAny.Set a"},{"name":"singleton","comment":" Create a set with one value.\n","type":"a -> SetAny.Set a"},{"name":"size","comment":" Determine the number of elements in a set.\n","type":"SetAny.Set a -> Basics.Int"},{"name":"toList","comment":" Convert a set into a list, sorted from lowest to highest.\n","type":"SetAny.Set a -> List.List a"},{"name":"union","comment":" Get the union of two sets. Keep all values.\n","type":"(a -> a -> Basics.Order) -> SetAny.Set a -> SetAny.Set a -> SetAny.Set a"}],"binops":[]}]