Extensions to the core List library.
Merge two lists. The first argument is a function which returns the unique ID of each element. Where an element appears more than once, the last won wins.
Wrap a single item into a List.
Wrap a maybe item into a List. If the item is Nothing, the List is empty.
Find the first element in the List that matches the given predicate.
Like List.tail, but if the list is empty it returns an empty list rather than Nothing.
Return a new list with duplicates removed. Order is preserved.
Extract the first item from the List, demanding that there be exactly one element.
For example, Json.Decode.customDecoder string exactlyOne creates a
decoder that expects a list of strings, where there is only one
element in the List.
If you think that's weird, you haven't seen enough real-world JSON. ;-)
Split a list into chunks of length
n.Be aware that the last sub-list may be smaller than
n-items long.For example
chunk 3 [1..10] => [[1,2,3], [4,5,6], [7,8,9], [10]]