Returns a deferred sequence that yields the supplied element before the source iterable.
Type of elements within the source iterable.
source
The source iterable.
Element emitted before the original sequence.
A sequence that yields element followed by the elements from source.
Enumeration is deferred; source is not iterated until the resulting sequence is consumed.
const numbers = [1, 2, 3];const prepended = prepend(numbers, 0).toArray();console.log(prepended); // [0, 1, 2, 3] Copy
const numbers = [1, 2, 3];const prepended = prepend(numbers, 0).toArray();console.log(prepended); // [0, 1, 2, 3]
Returns a deferred sequence that yields the supplied element before the source iterable.