Creates an Iterable that emits an infinite sequence of values generated by a Provider function.
let counter = 0;const numbers = generate(() => i++);const [value1, value2] = numbers;console.log(value1, value2); // 0, 1
iterate for similar operations.
the Iterable value type
a Function that produces values
Generated using TypeDoc
Creates an Iterable that emits an infinite sequence of values generated by a Provider function.
Example
See
iterate for similar operations.