[
    {
        "name": "Sort.Set",
        "comment": " A set of unique values.\n\nInsert, remove, and query operations all take _O(log n)_ time.\n\nThis implementation is based on\n[`Skinney/elm-dict-exploration`](http://package.elm-lang.org/packages/Skinney/elm-dict-exploration),\nexcept that it uses `Sorter` instead of `comparable`, so it permits keys\nthat are not `comparable`.\n\n\n# Sets\n\n@docs Set\n\n\n# Build\n\n@docs empty, singleton, add, 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",
                "args": [
                    "t"
                ],
                "cases": []
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "add",
                "comment": " Add a value to a set.\n",
                "type": "a -> Set a -> Set a"
            },
            {
                "name": "diff",
                "comment": " Keep a value when it appears in the `original` set\nbut not in the `other` set.\n\nThe `original` set's `Sorter` will be used.\n\n",
                "type": "{ original : Set a, other : Set a } -> Set a"
            },
            {
                "name": "empty",
                "comment": " Create an empty set.\n",
                "type": "Sorter a -> Set a"
            },
            {
                "name": "filter",
                "comment": " Only keep elements that pass the given test.\n\n    import Set exposing (Set)\n\n    numbers : Set Int\n    numbers =\n        Set.fromList [ -2, -1, 0, 1, 2 ]\n\n    positives : Set Int\n    positives =\n        Set.filter (\\x -> x > 0) numbers\n\n\n    -- positives == Set.fromList [1,2]\n\n",
                "type": "(a -> Bool) -> Set a -> Set a"
            },
            {
                "name": "foldl",
                "comment": " Fold over the values in a set, in order from lowest to highest.\n",
                "type": "(a -> b -> b) -> b -> 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 -> Set a -> b"
            },
            {
                "name": "fromList",
                "comment": " Convert a list into a set, removing any duplicates.\n",
                "type": "Sorter a -> List a -> Set a"
            },
            {
                "name": "intersect",
                "comment": " Get the intersection of two sets. Keeps values that appear in both sets.\n",
                "type": "Sorter a -> Set a -> Set a -> Set a"
            },
            {
                "name": "isEmpty",
                "comment": " Determine if a set is empty.\n",
                "type": "Set a -> Bool"
            },
            {
                "name": "map",
                "comment": " Map a function onto a set, creating a new set with no duplicates.\n",
                "type": "Sorter b -> (a -> b) -> Set a -> Set b"
            },
            {
                "name": "member",
                "comment": " Determine if a value is in a set.\n",
                "type": "a -> Set a -> 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 -> Bool) -> Set a -> ( Set a, Set a )"
            },
            {
                "name": "remove",
                "comment": " Remove a value from a set. If the value is not found, no changes are made.\n",
                "type": "a -> Set a -> Set a"
            },
            {
                "name": "singleton",
                "comment": " Create a set with one value.\n",
                "type": "Sorter a -> a -> Set a"
            },
            {
                "name": "size",
                "comment": " Determine the number of elements in a set.\n",
                "type": "Set a -> Int"
            },
            {
                "name": "toList",
                "comment": " Convert a set into a list, sorted from lowest to highest.\n",
                "type": "Set a -> List a"
            },
            {
                "name": "union",
                "comment": " Get the union of two sets. Keep all values.\n",
                "type": "Sorter a -> Set a -> Set a -> Set a"
            }
        ],
        "binops": []
    },
    {
        "name": "Sort.Dict",
        "comment": " A dictionary mapping unique keys to values.\n\nInsert, remove, and query operations all take _O(log n)_ time.\n\nThis implementation is based on\n[`Skinney/elm-dict-exploration`](http://package.elm-lang.org/packages/Skinney/elm-dict-exploration),\nexcept that it uses `Sorter` instead of `comparable`, so it permits keys\nthat are not `comparable`.\n\n\n# Dictionaries\n\n@docs Dict\n\n\n# Build\n\n@docs empty, singleton, store, remove, update\n\n\n# Query\n\n@docs isEmpty, size, get, member\n\n\n# Transform\n\n@docs map, filter, foldl, foldr, partition\n\n\n# Combine\n\n@docs storeAll, intersect, diff, merge\n\n\n# Lists\n\n@docs keys, values, toList, fromList\n\n",
        "unions": [],
        "aliases": [
            {
                "name": "Dict",
                "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",
                "args": [
                    "key",
                    "value"
                ],
                "type": "Dict key value"
            }
        ],
        "values": [
            {
                "name": "diff",
                "comment": " Keep a key-value pair when its key appears in the `original` dictionary\nbut not in the `other` dictionary.\n\nThe `original` dictionary's `Sorter` will be used.\n\n",
                "type": "{ original : Dict k v, other : Dict k v } -> Dict k v"
            },
            {
                "name": "empty",
                "comment": " Create an empty dictionary.\n",
                "type": "Sorter k -> Dict k v"
            },
            {
                "name": "filter",
                "comment": " Keep a key-value pair when it satisfies a predicate.\n",
                "type": "(k -> v -> Bool) -> Dict k v -> Dict k v"
            },
            {
                "name": "foldl",
                "comment": " Fold over the key-value pairs in a dictionary, in order from lowest\nkey to highest key.\n",
                "type": "(k -> v -> b -> b) -> b -> Dict k v -> b"
            },
            {
                "name": "foldr",
                "comment": " Fold over the key-value pairs in a dictionary, in order from highest\nkey to lowest key.\n",
                "type": "(k -> v -> b -> b) -> b -> Dict k v -> b"
            },
            {
                "name": "fromList",
                "comment": " Convert an association list into a dictionary.\n",
                "type": "Sorter k -> List ( k, v ) -> 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    animals = fromList [ (\"Tom\", Cat), (\"Jerry\", Mouse) ]\n    get \"Tom\" animals == Just Cat\n    get \"Jerry\" animals == Just Mouse\n    get \"Spike\" animals == Nothing\n\n",
                "type": "k -> Dict k v -> Maybe v"
            },
            {
                "name": "intersect",
                "comment": " Keep a key-value pair when its key appears in the both the `preferred` and\nin the `other` dictionary.\n\nPreference for values and `Sorter` is given to values in the `preferred` dictionary.\n\n",
                "type": "{ preferred : Dict k v, other : Dict k v } -> Dict k v"
            },
            {
                "name": "isEmpty",
                "comment": " Determine if a dictionary is empty.\nisEmpty empty == True\n",
                "type": "Dict k v -> Bool"
            },
            {
                "name": "keys",
                "comment": " Get all of the keys in a dictionary, sorted from lowest to highest.\nkeys (fromList [(0,\"Alice\"),(1,\"Bob\")]) == [0,1]\n",
                "type": "Dict k v -> List k"
            },
            {
                "name": "map",
                "comment": " Apply a function to all values in a dictionary.\n",
                "type": "(k -> a -> b) -> Dict k a -> Dict k b"
            },
            {
                "name": "member",
                "comment": " Determine if a key is in a dictionary.\n",
                "type": "k -> Dict k v -> 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    You then traverse all the keys from lowest to highest, building up whatever\n    you want.\n\n",
                "type": "Sorter k -> (k -> a -> result -> result) -> (k -> a -> b -> result -> result) -> (k -> b -> result -> result) -> Dict k a -> Dict 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 -> Bool) -> Dict k v -> ( Dict k v, 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 -> Dict k v -> Dict k v"
            },
            {
                "name": "singleton",
                "comment": " Create a dictionary with one key-value pair.\n",
                "type": "Sorter k -> k -> v -> Dict k v"
            },
            {
                "name": "size",
                "comment": " Determine the number of key-value pairs in the dictionary.\n",
                "type": "Dict k v -> Int"
            },
            {
                "name": "store",
                "comment": " Store a key-value pair in a dictionary. Replaces value when that key is\nalready present.\n",
                "type": "k -> v -> Dict k v -> Dict k v"
            },
            {
                "name": "storeAll",
                "comment": " Take all the key-value pairs in the `from` dictionary and\n`store` them into the `into` dictionary.\n",
                "type": "{ from : Dict k v, into : Dict k v } -> Dict k v"
            },
            {
                "name": "toList",
                "comment": " Convert a dictionary into an association list of key-value pairs, sorted by keys.\n",
                "type": "Dict k v -> List ( k, v )"
            },
            {
                "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\nstored too.\n",
                "type": "k -> (Maybe v -> Maybe v) -> Dict k v -> Dict k v"
            },
            {
                "name": "values",
                "comment": " Get all of the values in a dictionary, in the order of their keys.\nvalues (fromList [(0,\"Alice\"),(1,\"Bob\")]) == [\"Alice\", \"Bob\"]\n",
                "type": "Dict k v -> List v"
            }
        ],
        "binops": []
    },
    {
        "name": "Sort",
        "comment": " Sort values. You can use this as a self-documenting alternative to `List.sort`:\n\n    Sort.list Sort.alphabetical [ \"foo\", \"bar\", \"baz\" ]\n        --> [ \"baz\", \"bar\", \"foo\" ]\n\nYou can also use [`Sort.by`](#by), [`Sort.reverse`](#reverse), and [`Sort.tiebreaker`](#tiebreaker) to transform sorters:\n\n    -- Sort users by name, in reverse alphabetical order\n    Sort.list\n        (Sort.by .name (Sort.reverse Sort.alphabetical))\n        users\n\nFinally, you can use these to create sets and dictionaries with keys that\ndo not have to be `comparable`. See the `Sort.Dict` and `Sort.Set` modules.\n\n\n## Types\n\n@docs Sorter\n\n\n## Conversions\n\n@docs custom, toOrder\n\n\n## Composing Sorters\n\n@docs reverse, by, tiebreaker\n\n\n## Primitives\n\n@docs alphabetical, increasing\n\n\n## Collections\n\n@docs list\n\n",
        "unions": [
            {
                "name": "Sorter",
                "comment": " A description of how to sort values of a particular type.\n",
                "args": [
                    "a"
                ],
                "cases": []
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "alphabetical",
                "comment": " Sort strings alphabetically.\n\n    Sort.list Sort.alphabetical [ \"cabbage\", \"banana\", \"apple\" ]\n    --> [ \"apple\", \"banana\", \"cabbage\" ]\n\nTo sort in reverse alphabetical order, use [`Sort.reverse`](#reverse)\n\n    Sort.list (Sort.reverse Sort.alphabetical) [ \"cabbage\", \"banana\", \"apple\" ]\n    --> [ \"cabbage\",  \"banana\", \"apple\" ]\n\n",
                "type": "Sorter String"
            },
            {
                "name": "by",
                "comment": " Sort by a derived value.\n\nOne way to use this is with collections of records:\n\n    Sort.list (Sort.by .name Sort.alphabetical)\n      [ { name = \"Bo\" }, { name = \"Amy\" }, { name = \"Cam\" } ]\n    --> [ { name = \"Amy\" }, { name = \"Bo\" }, { name = \"Cam\" } ]\n\nAnother use is for unwrapping union type constructors:\n\n    import Sort exposing (Sorter)\n\n    type Username\n        = Username String\n\n    alphabetical : Sorter Username\n    alphabetical =\n        Sort.by (\\(Username str) -> str) Sort.alphabetical\n\n",
                "type": "(b -> a) -> Sorter a -> Sorter b"
            },
            {
                "name": "custom",
                "comment": " Create a custom [`Sorter`](#Sorter) by defining how to order two values.\n",
                "type": "(a -> a -> Order) -> Sorter a"
            },
            {
                "name": "increasing",
                "comment": " Sort numbers from lowest to highest.\n\n    Sort.list Sort.increasing [ 4, 7, 2 ]\n    --> [ 2, 4, 7 ]\n\nTo sort decreasing, use [`Sort.reverse`](#reverse)\n\n    Sort.list (Sort.reverse Sort.increasing) [ 4, 7, 2 ]\n    --> [ 7, 4, 2 ]\n\n",
                "type": "Sorter number"
            },
            {
                "name": "list",
                "comment": " Sort a list using a `Sorter`.\n\nThis can be used as an alternative to `List.sort`, `List.sortBy`, and `List.sortWith`.\n\n    Sort.list Sort.alphabetical [ \"foo\", \"bar\", \"baz\" ]\n        --> [ \"baz\", \"bar\", \"foo\" ]\n\nYou can also use `Sort.by` and `Sort.reverse` to transform sorters:\n\n    -- Sort users by name, in reverse alphabetical order\n    Sort.list\n        (Sort.by .name (Sort.reverse Sort.alphabetical))\n        users\n\n",
                "type": "Sorter a -> List a -> List a"
            },
            {
                "name": "reverse",
                "comment": " Reverse a sorter.\n\n    Sort.list Sort.alphabetical [ \"b\", \"c\", \"a\" ]\n    --> [ \"a\", \"b\", \"c\" ]\n\n    Sort.list (Sort.reverse Sort.alphabetical) [ \"b\", \"c\", \"a\" ]\n    --> [ \"c\", \"b\", \"a\" ]\n\n",
                "type": "Sorter a -> Sorter a"
            },
            {
                "name": "tiebreaker",
                "comment": " Apply a tiebreaker `Sorter` to use when the given `Sorter` finds the\ntwo values are equal.\n\nThis would be useful in a table that is sorted by multiple columns.\n\n    -- Without tiebreaker\n    Sort.list (Sort.by .name Sort.alphabetical)\n        [ { name = \"Bo\", cats = 4 }, { name = \"Bo\", cats = 2 }, { name = \"Amy\", cats = 3 } ]\n        --> [ { name = \"Amy\", cats = 3 }, { name = \"Bo\", cats = 4 }, { name = \"Bo\", cats = 2 } ]\n\n    -- With tiebreaker, the last two records are swapped\n    Sort.list (Sort.by .name Sort.alphabetical |> Sort.tiebreaker (Sort.by .cats Sort.increasing))\n        [ { name = \"Bo\", cats = 4 }, { name = \"Bo\", cats = 2 }, { name = \"Amy\", cats = 3 } ]\n        --> [ { name = \"Amy\", cats = 3 }, { name = \"Bo\", cats = 2 }, { name = \"Bo\", cats = 4 } ]\n\n",
                "type": "Sorter b -> Sorter b -> Sorter b"
            },
            {
                "name": "toOrder",
                "comment": " Determine an Order for two values, based on the given\n[`Sorter`](#Sorter)\n",
                "type": "Sorter a -> a -> a -> Order"
            }
        ],
        "binops": []
    }
]