Const
Prepends a single item ahead of all elements produced by the source iterable.
Curried version of _prepend.
Element type produced by the source iterable.
Element yielded before any value from the source iterable.
A deferred iterable that first yields item and then every element from src.
item
src
const values = [..._prepend([2, 3], 1)];console.log(values); // [1, 2, 3] Copy
const values = [..._prepend([2, 3], 1)];console.log(values); // [1, 2, 3]
or using the curried version:
const values = [ ...pipeInto( [2, 3], prepend(1) ),];console.log(values); // [1, 2, 3] Copy
const values = [ ...pipeInto( [2, 3], prepend(1) ),];console.log(values); // [1, 2, 3]
Prepends a single item ahead of all elements produced by the source iterable.
Curried version of _prepend.