[
    {
        "name": "List.Nonempty",
        "comment": " A list that cannot be empty. The head and tail can be accessed without Maybes. Most other list functions are\navailable.\n\n# Definition\n@docs Nonempty\n\n# Create\n@docs fromElement, fromList\n\n# Access\n@docs head, tail, toList, get, sample\n\n# Inspect\nNonempty lists support equality with the usual `(==)` operator (provided their contents also support equality).\n@docs isSingleton, length, member, all, any\n\n# Convert\n@docs cons, (:::), append, pop, reverse, concat\n\n# Swap\n@docs replaceHead, replaceTail, dropTail\n\n# Map\n@docs map, indexedMap, map2, andMap, concatMap\n\n# Filter\n@docs filter\n\n# Fold\nTo fold or scan from the right, reverse the list first.\n@docs foldl, foldl1, scanl, scanl1\n\n# Sort\n@docs sort, sortBy, sortWith\n\n# Deduplicate\nThe nonempty list's elements must support equality (e.g. not functions). Otherwise  you will get a runtime error.\n@docs dedup, uniq\n\n",
        "unions": [
            {
                "name": "Nonempty",
                "comment": " The Nonempty type. If you have both a head and tail, you can construct a\nnonempty list directly. Otherwise use the helpers below instead.\n",
                "args": [
                    "a"
                ],
                "cases": [
                    [
                        "Nonempty",
                        [
                            "a",
                            "List a"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "all",
                "comment": " Determine if all elements satisfy the predicate.\n",
                "type": "(a -> Bool) -> Nonempty a -> Bool"
            },
            {
                "name": "andMap",
                "comment": " Map over an arbitrary number of nonempty lists.\n\n    map2 (,) xs ys == map (,) xs  |> andMap ys\n    head (map (,,) xs |> andMap ys |> andMap zs) == (head xs, head ys, head zs)\n",
                "type": "Nonempty a -> Nonempty (a -> b) -> Nonempty b"
            },
            {
                "name": "any",
                "comment": " Determine if any elements satisfy the predicate.\n",
                "type": "(a -> Bool) -> Nonempty a -> Bool"
            },
            {
                "name": "append",
                "comment": " Append two nonempty lists together. `(++)` is _not_ supported.\n",
                "type": "Nonempty a -> Nonempty a -> Nonempty a"
            },
            {
                "name": "concat",
                "comment": " Flatten a nonempty list of nonempty lists into a single nonempty list.\n",
                "type": "Nonempty (Nonempty a) -> Nonempty a"
            },
            {
                "name": "concatMap",
                "comment": " Map a given function onto a nonempty list and flatten the resulting nonempty lists. If you're chaining, you can\ndefine `andThen = flip concatMap`.\n",
                "type": "(a -> Nonempty b) -> Nonempty a -> Nonempty b"
            },
            {
                "name": "cons",
                "comment": " Add another element as the head of the list, pushing the previous head to the tail.\n",
                "type": "a -> Nonempty a -> Nonempty a"
            },
            {
                "name": "dedup",
                "comment": " Remove _adjacent_ duplicate elements from the nonempty list.\n\n    dedup (Nonempty 1 [2, 2, 1]) == Nonempty 1 [2, 1]\n",
                "type": "Nonempty a -> Nonempty a"
            },
            {
                "name": "dropTail",
                "comment": " Replace the tail with the empty list while leaving the head alone.\n",
                "type": "Nonempty a -> Nonempty a"
            },
            {
                "name": "filter",
                "comment": " Filter a nonempty list. If all values are filtered out, return the singleton list containing the default value\nprovided. If any value is retained, the default value is not used. If you want to deal with a Maybe instead, use\n`toList >> List.filter yourPredicate >> fromList`.\n\n    filter isEven 0 (Nonempty 7 [2, 5]) == fromElement 2\n    filter isEven 0 (Nonempty 7 []) == fromElement 0\n\n",
                "type": "(a -> Bool) -> a -> Nonempty a -> Nonempty a"
            },
            {
                "name": "foldl",
                "comment": " Reduce a nonempty list from the left with a base case.\n\n    foldl (++) \"\" (Nonempty \"a\" [\"b\", \"c\"]) == \"cba\"\n",
                "type": "(a -> b -> b) -> b -> Nonempty a -> b"
            },
            {
                "name": "foldl1",
                "comment": " Reduce a nonempty list from the left _without_ a base case. As per Elm convention, the first argument is the current\nelement and the second argument is the accumulated value. The function is first invoked on the _second_ element, using\nthe first element as the accumulated value, except for singleton lists in which has the head is returned.\n\n    foldl1 (++) (Nonempty \"a\" [\"b\", \"c\"]) == \"cba\"\n    foldl1 (++) (fromElement \"a\") == \"a\"\n\n    findMe = 42\n    minimizeMe n = abs (n-findMe)\n    nearest = foldl1 (\\a b -> if minimizeMe a < minimizeMe b then a else b) (Nonempty 10 [20,30,40,50,60])\n    nearest == 40\n",
                "type": "(a -> a -> a) -> Nonempty a -> a"
            },
            {
                "name": "fromElement",
                "comment": " Create a singleton list with the given element.\n",
                "type": "a -> Nonempty a"
            },
            {
                "name": "fromList",
                "comment": " Create a nonempty list from an ordinary list, failing on the empty list.\n",
                "type": "List a -> Maybe (Nonempty a)"
            },
            {
                "name": "get",
                "comment": " Get the item at the specified index. The head has index 0. Indices are modulused by the length so out-of-range\nerrors can't happen. This means that negative indices are supported, e.g. -1 to get the last element.\n",
                "type": "Int -> Nonempty a -> a"
            },
            {
                "name": "head",
                "comment": " Return the head of the list.\n",
                "type": "Nonempty a -> a"
            },
            {
                "name": "indexedMap",
                "comment": " Same as `map` but the function is also applied to the index of each element (starting at zero).\n",
                "type": "(Int -> a -> b) -> Nonempty a -> Nonempty b"
            },
            {
                "name": "isSingleton",
                "comment": " Determine if the nonempty list has exactly one element.\n",
                "type": "Nonempty a -> Bool"
            },
            {
                "name": "length",
                "comment": " Find the length of the nonempty list.\n",
                "type": "Nonempty a -> Int"
            },
            {
                "name": "map",
                "comment": " Map a function over a nonempty list.\n",
                "type": "(a -> b) -> Nonempty a -> Nonempty b"
            },
            {
                "name": "map2",
                "comment": " Map a function over two nonempty lists.\n",
                "type": "(a -> b -> c) -> Nonempty a -> Nonempty b -> Nonempty c"
            },
            {
                "name": "member",
                "comment": " Determine if an element is present in the nonempty list.\n",
                "type": "a -> Nonempty a -> Bool"
            },
            {
                "name": "pop",
                "comment": " Pop and discard the head, or do nothing for a singleton list. Useful if you\nwant to exhaust a list but hang on to the last item indefinitely.\n\n    pop (Nonempty 3 [2,1]) == Nonempty 2 [1]\n    pop (Nonempty 1 []) == Nonempty 1 []\n",
                "type": "Nonempty a -> Nonempty a"
            },
            {
                "name": "replaceHead",
                "comment": " Exchange the head element while leaving the tail alone.\n",
                "type": "a -> Nonempty a -> Nonempty a"
            },
            {
                "name": "replaceTail",
                "comment": " Exchange the tail for another while leaving the head alone.\n",
                "type": "List a -> Nonempty a -> Nonempty a"
            },
            {
                "name": "reverse",
                "comment": " Reverse a nonempty list.\n",
                "type": "Nonempty a -> Nonempty a"
            },
            {
                "name": "sample",
                "comment": " Create a random generator that returns a value of the nonempty list chosen uniformly at random.\n",
                "type": "Nonempty a -> Generator a"
            },
            {
                "name": "scanl",
                "comment": " Like `foldl`, but keep each intermediate value. For example, scan addition to create the cumulative sum up to each\nelement. The head of the new nonempty list is always the base case provided, and the length increases by 1.\n\n    scanl (++) \"\" (Nonempty \"a\" [\"b\", \"c\"]) == Nonempty \"\" [\"a\",\"ba\",\"cba\"]\n",
                "type": "(a -> b -> b) -> b -> Nonempty a -> Nonempty b"
            },
            {
                "name": "scanl1",
                "comment": " Like `foldl1`, but keep each intermediate value. The head and length are not changed.\n\nThis example starts with the number of ways to roll exactly index _i_ on two six-sided dice (the probability density\nfunction), and turns it into the number of ways to roll at least _i_ (the cumulative density function).\n\n    dicePDF = Nonempty 0 [0,1,2,3,4,5,6,5,4,3,2,1]\n    diceCDF = scanl1 (+) dicePDF\n    diceCDF == Nonempty 0 [0,1,3,6,10,15,21,26,30,33,35,36]\n",
                "type": "(a -> a -> a) -> Nonempty a -> Nonempty a"
            },
            {
                "name": "sort",
                "comment": " Sort a nonempty list of comparable things, lowest to highest.\n",
                "type": "Nonempty comparable -> Nonempty comparable"
            },
            {
                "name": "sortBy",
                "comment": " Sort a nonempty list of things by a derived property.\n",
                "type": "(a -> comparable) -> Nonempty a -> Nonempty a"
            },
            {
                "name": "sortWith",
                "comment": " Sort a nonempty list of things by a custom comparison function.\n",
                "type": "(a -> a -> Order) -> Nonempty a -> Nonempty a"
            },
            {
                "name": "tail",
                "comment": " Return the tail of the list.\n",
                "type": "Nonempty a -> List a"
            },
            {
                "name": "toList",
                "comment": " Convert to an ordinary list.\n",
                "type": "Nonempty a -> List a"
            },
            {
                "name": "uniq",
                "comment": " Remove _all_ duplicate elements from the nonempty list, with the remaining elements ordered by first occurrence.\n\n    uniq (Nonempty 1 [2, 2, 1]) == Nonempty 1 [2]\n",
                "type": "Nonempty a -> Nonempty a"
            }
        ],
        "binops": [
            {
                "name": ":::",
                "comment": " Infix cons. Note that you cannot use this for pattern matching. Be sure to add `exposing ((:::))` to your import.\n\n    4 ::: Nonempty 3 [2,1] == Nonempty 4 [3,2,1]\n\nNote: the infix associativity and precedence are not set for this operator, because doing so can cause\n[conflicts](https://github.com/elm-lang/elm-compiler/issues/1096) that are hard to work around. In most cases this\nshouldn't matter.\n\n",
                "type": "a -> Nonempty a -> Nonempty a",
                "associativity": "left",
                "precedence": 9
            }
        ]
    }
]