Returns a Generator over the next 'count' items of the iterable or iterator. In most cases you will call this function with an iterator.
If a firstValue is specified, it will be yielded first.
Optional
import { next, forceIterator } from 'deleight/generators';const it = forceIterator([1, 'a', 2, 'b', 3, 'c', 4, 'd']);const [num1, let1] = next(it, 2); // (1, 'a')const [num2, let2] = next(it, 2); // (2, 'b') Copy
import { next, forceIterator } from 'deleight/generators';const it = forceIterator([1, 'a', 2, 'b', 3, 'c', 4, 'd']);const [num1, let1] = next(it, 2); // (1, 'a')const [num2, let2] = next(it, 2); // (2, 'b')
Returns a Generator over the next 'count' items of the iterable or iterator. In most cases you will call this function with an iterator.
If a firstValue is specified, it will be yielded first.