[
    {
        "name": "List.Nonempty",
        "comment": "A list that cannot be empty. The head and tail can be accessed without Maybes.\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\n\n# Convert\n@docs cons, pop, reverse, concat\n\n# Swap\n@docs replaceHead, replaceTail, dropTail\n\n# Map\n@docs map, map2",
        "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": "dropTail",
                "comment": "Replace the tail with the empty list while leaving the head alone.",
                "type": "Nonempty a -> Nonempty 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": "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": "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"
            }
        ],
        "binops": []
    }
]