Lazy list implementation in Elm.
Get the head and tail of a list.
Reduce a list with a given reducer and an initial value.
Example : reduce (+) 0 (fromList [1, 2, 3, 4]) == 10
Produce intermediate values of reduce.
Flatten a list of lists into a single list by appending all the inner lists into one big list.
Places the given value between all members of the given list.
Interleave the elements of a list in another list. The two lists get interleaved at the end.
Create an infinite list of applications of a function on some value.
Equivalent to:
cons x (cons (f x) (cons (f (f x)) (cons (f (f (f x))) ... -- etc...Repeat a value ad infinitum.
Be careful when you use this. The result of this is a truly infinite list.
Do not try calling reduce or toList on an infinite list as it'll never
finish computing. Make sure you then filter it down to a finite list with head
or take or something.
Take elements from a list as long as the predicate is satisfied.
Drop elements from a list as long as the predicate is satisfied.
Map a function that may fail over a lazy list, keeping only the values that were successfully transformed.
Known as mapN in some circles. Allows you to apply map in cases
where then number of arguments are greater than 5.
The argument order is such that it works well with |> chains.
The infinite list of counting numbers.
i.e.:
cons 1 (cons 2 (cons 3 (cons 4 (cons 5 ... -- etc...Create a lazy list containing all possible pairs in the given lazy lists.
The lazy list type.