queue Of
Creates a new Queue instance wrapping the given values.
The created queue will have an initial capacity equal to the number of args passed.
Example:
val queue = queueOf(1, 2, 3)
queue.next() // 1
queue.next() // 2
queue.next() // 3
Content copied to clipboard
Return
A new queue wrapping the given values.
Parameters
values
Values to append to the newly created queue.
Creates a new Queue instance wrapping the given values.
Example:
val queue = queueOf(listOf(1, 2, 3))
queue.next() // 1
queue.next() // 2
queue.next() // 3
Content copied to clipboard
Return
A new queue wrapping the given values.
Parameters
values
Values to append to the newly created queue.