Formerly Skinney/elm-deque. Search finds this package by either name.
A double ended queue (deque, pronounced 'deck')
Initialize a list of some length with some function.
initialize n f creates a list of length n with the element at index i initialized to the result of f i.
Create a list with n copies of a value:
repeat 3 ( 0, 0 ) == [ ( 0, 0 ), ( 0, 0 ), ( 0, 0 ) ]Create a list of numbers, every element increasing by one. You give the lowest and highest number that should be in the list.
range 3 6 == [ 3, 4, 5, 6 ]
range 3 3 == [ 3 ]
range 6 3 == []Create a new deque containing all the elements of the provided deques. Order is preserved.
Returns a tuple of the first element and the remaining elements of the deque.
The first element of the tuple will be Nothing íf this is run on the empty deque.
Returns a tuple containing the last element and the remaining elements of the deque.
The first element of the tuple will be Nothing if this function is run on the empty deque.
Create a new deque where every element is the result of running fn on every element.
Create a new deque which only contains the elements where the provided fn returned True
Allows running both filter and map in the same operation. The provided function
is run on every element and returns a Maybe. Only the Just values will be kept in the
resulting deque
Fold over the elements of the deque starting from the front.
Fold over the elements of the deque starting from the back.
The deque datatype
Deque equality with (==) is unreliable (equivalent deques can have a different distribution of elements between the back and the front) and should not be used.