Skip to content

queue

queue<T>(initialize): QueueGenerator<T>

Creates a generator that acts as a LIFO queue.

Example

collect(queue([1,2,3]))
// => [1, 2, 3]

Type Parameters

T

The element type.

Parameters

initialize

Iterable<T> = []

The initial values to fill the queue.

Returns

QueueGenerator<T>

The queue generator.