Returns a Stream that defers the creation of the Iterable until the Stream is iterated.
Type of items in the Iterable.
Factory function that returns an Iterable.
Stream that defers the creation of the Iterable.
const result = defer(() => 'ABCD');console.log([...result]); // ['A', 'B', 'C', 'D'] Copy
const result = defer(() => 'ABCD');console.log([...result]); // ['A', 'B', 'C', 'D']
Returns a Stream that defers the creation of the Iterable until the Stream is iterated.