The starting value (inclusive), defaults to 0
The step value to increment by, defaults to 1
An infinite generator of numbers
// Generate numbers starting from 0 with default step of 1
const counter = from()
const first5 = Array.from({ length: 5 }, () => counter.next().value)
// Result: [0, 1, 2, 3, 4]
Creates an infinite generator that yields a sequence of numbers starting from a given value. Similar to Python's range() function, but produces an infinite sequence.