Returns an iterator over the next 'count' items of the iterator.
Note that, for performance reasons, this only accepts an iterator as the 'it' argument. All the other module functions accept iterables.
You can convert any iterable to an iterator using the iter funtion as shown in the following example.
iter
If a firstValue is specified, it will be yielded first.
Optional
import { nextItems, iter } from 'deleight/generational';const it = iter([1, 'a', 2, 'b', 3, 'c', 4, 'd']);const [num, let] = next(it, 2); Copy
import { nextItems, iter } from 'deleight/generational';const it = iter([1, 'a', 2, 'b', 3, 'c', 4, 'd']);const [num, let] = next(it, 2);
Returns an iterator over the next 'count' items of the iterator.
Note that, for performance reasons, this only accepts an iterator as the 'it' argument. All the other module functions accept iterables.
You can convert any iterable to an iterator using the
iter
funtion as shown in the following example.If a firstValue is specified, it will be yielded first.