Initial value of the sequence.
Step size to increment each subsequent value.
An infinite sequence of numbers starting from start, incremented by step for each subsequent element.
Enumeration is deferred and will continue indefinitely unless limited by operations like take or takeWhile. The sequence can be ascending (positive step) or descending (negative step).
const ascending = infiniteSequence(1, 1).take(5).toArray();
console.log(ascending); // [1, 2, 3, 4, 5]
Generates an infinite numeric sequence starting from the specified value with the given step increment.