[{"name":"NonEmpty","comment":" A list with at least one element\n\n\n# Types\n\n@docs NonEmpty\n\n\n# Construction\n\n@docs create, cons, singleton, repeat, range, generate, fromList, withDefault, withExample\n\n\n# Transform\n\n@docs map, indexedMap, foldl, foldr, reduce\n\n\n# Filtering\n\n@docs filter, filterMap\n\n\n# Combine\n\n@docs append, concat, concatMap, intersperse, map2, map3, map4, map5\n\n\n# Sort\n\n@docs sort, sortBy, sortWith\n\n\n# Deconstruct\n\n@docs isEmpty, head, tail, take, drop, partition, uncons, unzip\n\n\n# Utilities\n\n@docs length, all, any, minimum, maximum, sum, product, member, reverse, toList\n\n\n# Indexed operations\n\n@docs getAt, insertAt, removeAt, updateAt\n\n","unions":[{"name":"NonEmpty","comment":" A list of a\\`s with at least 1 element.\n","args":["a"],"cases":[["NonEmpty",["a","List.List a"]]]}],"aliases":[],"values":[{"name":"all","comment":" Determine if all elements satisfy some test.\n\n    all (\\x -> modBy 2 == 0) (range 1 5) == False\n\n","type":"(a -> Basics.Bool) -> NonEmpty.NonEmpty a -> Basics.Bool"},{"name":"any","comment":" Determine if any elements satisfy some test.\n\n    any (\\x -> modBy 2 == 0) (range 1 5) == True\n\n","type":"(a -> Basics.Bool) -> NonEmpty.NonEmpty a -> Basics.Bool"},{"name":"append","comment":" Put two lists together.\n\n    append (range 1 3) (range 4 5) == range 1 5\n\n","type":"NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"concat","comment":" Concatenate a bunch of lists into a single list\n","type":"NonEmpty.NonEmpty (NonEmpty.NonEmpty a) -> NonEmpty.NonEmpty a"},{"name":"concatMap","comment":" Map a given function onto a list and flatten the resulting lists.\n\n    concatMap f xs == concat (map f xs)\n\n","type":"(a -> NonEmpty.NonEmpty b) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty b"},{"name":"cons","comment":" Add an element to the front of a list.\n","type":"a -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"create","comment":" Create list from first element and tail\n","type":"a -> List.List a -> NonEmpty.NonEmpty a"},{"name":"drop","comment":" Drop (at most) the first n elements.\n\nThe resulting list will have at least one element\n\n    drop 2 (range 1 5)\n        |> toList\n        == [ 3, 4, 5 ]\n\n","type":"Basics.Int -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"filter","comment":" Keep elements that satisfy the test.\n\nReturn a list, since result might be empty.\n\n","type":"(a -> Basics.Bool) -> NonEmpty.NonEmpty a -> List.List a"},{"name":"filterMap","comment":" Filter out certain values.\n\nReturn a list, since result might be empty.\n\n","type":"(a -> Maybe.Maybe b) -> NonEmpty.NonEmpty a -> List.List b"},{"name":"foldl","comment":" Reduce a list from the left.\n","type":"(a -> b -> b) -> b -> NonEmpty.NonEmpty a -> b"},{"name":"foldr","comment":" Reduce a list from the right.\n","type":"(a -> b -> b) -> b -> NonEmpty.NonEmpty a -> b"},{"name":"fromList","comment":" Try to create sequence from a list with at least two elements\n","type":"List.List a -> Maybe.Maybe (NonEmpty.NonEmpty a)"},{"name":"generate","comment":" Generate a new List from iterating over pairs of elements in the NonEmpty list.\n\n    generate Tuple.pair (range 1 5)\n        == [ ( 1, 2 ), ( 2, 3 ), ( 3, 4 ), ( 4, 5 ) ]\n\n","type":"(a -> a -> b) -> NonEmpty.NonEmpty a -> List.List b"},{"name":"getAt","comment":" Returns Just the element at the given index in the list, or Nothing if the index is out of range.\n\n    getAt 1 (range 1 5) == Just 2\n\n","type":"Basics.Int -> NonEmpty.NonEmpty a -> Maybe.Maybe a"},{"name":"head","comment":" Return the first element\n\n    head (range 1 5) == 1\n\n","type":"NonEmpty.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":"(Basics.Int -> a -> b) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty b"},{"name":"insertAt","comment":" Insert element at given position.\n\n    insertAt 2 42 negate (range 1 5)\n        |> toList\n        == [ 1, 2, 42, 3, 4, 5 ]\n\n","type":"Basics.Int -> a -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"intersperse","comment":" Places the given value between all members of the given list.\n","type":"a -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"isEmpty","comment":" Always return False, since NonEmpty is never empty :)\n","type":"NonEmpty.NonEmpty a -> Basics.Bool"},{"name":"length","comment":" Determine the length of a list.\n\n    length (range 1 5) == 5\n\n","type":"NonEmpty.NonEmpty a -> Basics.Int"},{"name":"map","comment":" Apply a function to every element of a list.\n","type":"(a -> b) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty b"},{"name":"map2","comment":" Apply a two argument function pairwise to elements of both lists\n","type":"(a -> b -> r) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty b -> NonEmpty.NonEmpty r"},{"name":"map3","comment":" Apply a 3 argument function tuples of elements from all lists\n","type":"(a -> b -> c -> r) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty b -> NonEmpty.NonEmpty c -> NonEmpty.NonEmpty r"},{"name":"map4","comment":" Apply a 4 argument function tuples of elements from all lists\n","type":"(a -> b -> c -> d -> r) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty b -> NonEmpty.NonEmpty c -> NonEmpty.NonEmpty d -> NonEmpty.NonEmpty r"},{"name":"map5","comment":" Apply a 5 argument function tuples of elements from all lists\n","type":"(a -> b -> c -> d -> e -> r) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty b -> NonEmpty.NonEmpty c -> NonEmpty.NonEmpty d -> NonEmpty.NonEmpty e -> NonEmpty.NonEmpty r"},{"name":"maximum","comment":" Find the maximum element in a non-empty list.\n\n    maximum (range 1 5) == 5\n\n","type":"NonEmpty.NonEmpty comparable -> comparable"},{"name":"member","comment":" Figure out whether a list contains a value.\n\n    member 42 (range 1 3) == False\n\n","type":"a -> NonEmpty.NonEmpty a -> Basics.Bool"},{"name":"minimum","comment":" Find the minimum element in a non-empty list.\n\n    minimum (range 1 5) == 5\n\n","type":"NonEmpty.NonEmpty comparable -> comparable"},{"name":"partition","comment":" Partition a list based on some test.\n\nThe first list contains all values that satisfy the test, and the second list contains all the value that do not.\n\n","type":"(a -> Basics.Bool) -> NonEmpty.NonEmpty a -> ( List.List a, List.List a )"},{"name":"product","comment":" Get the product of the list elements.\n","type":"NonEmpty.NonEmpty number -> number"},{"name":"range","comment":" Create list from a range of values.\n\nThe first value is guaranteed to appear in the list.\n\n","type":"Basics.Int -> Basics.Int -> NonEmpty.NonEmpty Basics.Int"},{"name":"reduce","comment":" Reduce a list from left using operator.\n\nThis version of foldl does not require an accumulator since the list is guaranteed to not being empty\n\n","type":"(a -> a -> a) -> NonEmpty.NonEmpty a -> a"},{"name":"removeAt","comment":" Remove the element at an index from a list.\n\nReturn the original list if the index is out of range or if the resulting list would be empty.\n\n    removeAt 2 negate (range 1 5)\n        |> toList\n        == [ 1, 2, 4, 5 ]\n\n","type":"Basics.Int -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"repeat","comment":" Create a list with n (at least 2) copies of a value\n","type":"Basics.Int -> a -> NonEmpty.NonEmpty a"},{"name":"reverse","comment":" Reverse a list.\n\n    reverse (range 1 3)\n        |> toList\n        == [ 5, 4, 3, 2, 1 ]\n\n","type":"NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"singleton","comment":" Create a list with only one element\n","type":"a -> NonEmpty.NonEmpty a"},{"name":"sort","comment":" Sort values from lowest to highest\n","type":"NonEmpty.NonEmpty comparable -> NonEmpty.NonEmpty comparable"},{"name":"sortBy","comment":" Sort values by a derived property.\n","type":"(a -> comparable) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"sortWith","comment":" Sort values with a custom comparison function.\n\nThis is also the most general sort function, allowing you to define any other: sort == sortWith compare\n\n","type":"(a -> a -> Basics.Order) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"sum","comment":" Get the sum of the list elements.\n\n    sum (range 1 5) == 1 + 2 + 3 + 4 + 5\n\n","type":"NonEmpty.NonEmpty number -> number"},{"name":"tail","comment":" Extract the rest of the list.\n\n    head (range 1 5) == [ 2, 3, 4, 5 ]\n\n","type":"NonEmpty.NonEmpty a -> List.List a"},{"name":"take","comment":" Take (at most) the first n elements.\n\nThe number of elements n must be n >= 1, otherwise it returns the singleton list.\n\n    take 2 (range 1 5)\n        |> toList\n        == [ 1, 2 ]\n\nWARNING: differently from lists, `append (take n lst) (drop n lst)` do not always recover\nthe original list.\n\n","type":"Basics.Int -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"toList","comment":" Convert data to list\n","type":"NonEmpty.NonEmpty a -> List.List a"},{"name":"uncons","comment":" Deconstruct list into the head and tail parts\n\n    uncons (range 1 5)\n        == ( 1, [ 2, 3, 4, 5 ] )\n\n","type":"NonEmpty.NonEmpty a -> ( a, List.List a )"},{"name":"unzip","comment":" Decompose a list of tuples into a tuple of lists.\n\n    unzip (create ( \"a\", 1 ) [ ( \"b\", 2 ), ( \"c\", 3 ) ])\n        == ( NonEmpty \"a\" [ \"b\", \"c\" ], NonEmpty 1 [ 2, 3 ] )\n\n","type":"NonEmpty.NonEmpty ( a, b ) -> ( NonEmpty.NonEmpty a, NonEmpty.NonEmpty b )"},{"name":"updateAt","comment":" Update element at the given index\n\n    updateAt 2 negate (range 1 5)\n        |> toList\n        == [ 1, 2, -3, 4, 5 ]\n\n","type":"Basics.Int -> (a -> a) -> NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a"},{"name":"withDefault","comment":" Create NonEmpty from list, returning a singleton with the given default if list is empty.\n","type":"a -> List.List a -> NonEmpty.NonEmpty a"},{"name":"withExample","comment":" Create NonEmpty from list, returning example if list is empty.\n","type":"NonEmpty.NonEmpty a -> List.List a -> NonEmpty.NonEmpty a"}],"binops":[]}]