[
    {
        "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\n\n# Inspect\nNonempty lists support equality with the usual `(==)` operator.\n@docs isSingleton, length, member\n\n# Convert\n@docs cons, pop, reverse, concat\n\n# Swap\n@docs replaceHead, replaceTail, dropTail\n\n# Fold\nTo fold or scan from the right, reverse the list first.\n@docs foldl, foldl1, scanl, scanl1\n\n# Map\n@docs map, map2\n\n# Deduplicate\nThe elements must support equality or you will get a runtime error.\n@docs dedup, uniq",
        "unions": [
            {
                "name": "Nonempty",
                "comment": "The Nonempty type. If you have both a head and tail, you can construct a\nnonempty list directly. Usually you'll use one of the many helpers below instead.",
                "args": [
                    "a"
                ],
                "cases": [
                    [
                        "Nonempty",
                        [
                            "a",
                            "List a"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "concat",
                "comment": "Flatten a nonempty list of nonempty lists into a single nonempty list.",
                "type": "Nonempty (Nonempty a) -> Nonempty a"
            },
            {
                "name": "cons",
                "comment": "Add another element as the head of the list. Also available infix as\n`(:::)`; be sure to add `exposing ((:::))` to your import.",
                "type": "a -> Nonempty a -> Nonempty a"
            },
            {
                "name": "dedup",
                "comment": "Remove _adjacent_ duplicate elements from the nonempty list. For example, `1,2,2,1` becomes `1,2,1`.",
                "type": "Nonempty a -> Nonempty a"
            },
            {
                "name": "dropTail",
                "comment": "Replace the tail with the empty list while leaving the head alone.",
                "type": "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\"",
                "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\"",
                "type": "(a -> a -> a) -> Nonempty a -> a"
            },
            {
                "name": "fromElement",
                "comment": "Create a singleton list with the given element.",
                "type": "a -> Nonempty a"
            },
            {
                "name": "fromList",
                "comment": "Create a nonempty list from an ordinary list, failing on the empty list.",
                "type": "List a -> Maybe (Nonempty a)"
            },
            {
                "name": "head",
                "comment": "Return the head of the list.",
                "type": "Nonempty a -> a"
            },
            {
                "name": "isSingleton",
                "comment": "Determine if the nonempty list has exactly one element.",
                "type": "Nonempty a -> Bool"
            },
            {
                "name": "length",
                "comment": "Find the length of the nonempty list.",
                "type": "Nonempty a -> Int"
            },
            {
                "name": "map",
                "comment": "Map a function over a nonempty list.",
                "type": "(a -> b) -> Nonempty a -> Nonempty b"
            },
            {
                "name": "map2",
                "comment": "Map a function over two nonempty lists.",
                "type": "(a -> b -> c) -> Nonempty a -> Nonempty b -> Nonempty c"
            },
            {
                "name": "member",
                "comment": "",
                "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.",
                "type": "Nonempty a -> Nonempty a"
            },
            {
                "name": "replaceHead",
                "comment": "Exchange the head element while leaving the tail alone.",
                "type": "a -> Nonempty a -> Nonempty a"
            },
            {
                "name": "replaceTail",
                "comment": "Exchange the tail for another while leaving the head alone.",
                "type": "List a -> Nonempty a -> Nonempty a"
            },
            {
                "name": "reverse",
                "comment": "Reverse a nonempty list.",
                "type": "Nonempty a -> Nonempty 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.",
                "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.",
                "type": "(a -> a -> a) -> Nonempty a -> Nonempty a"
            },
            {
                "name": "tail",
                "comment": "Return the tail of the list.",
                "type": "Nonempty a -> List a"
            },
            {
                "name": "toList",
                "comment": "Convert to an ordinary list.",
                "type": "Nonempty a -> List a"
            },
            {
                "name": "uniq",
                "comment": "Remove _all_ duplicate elements from the nonempty list, with the remaining elements ordered by first occurrence. For example, `1,2,2,1` becomes `1,2`.",
                "type": "Nonempty a -> Nonempty a"
            }
        ],
        "binops": []
    }
]