import { slice } from "https://deno.land/x/iterators@v0.2.0/mod.ts";
Take a slice of an iterable, starting from 0.
[...slice(count()], 5)
// => [0, 1, 2, 3, 4]
Take a slice of an iterable.
[...slice(count(), 5, 10)]
// => [5, 6, 7, 8, 9]
Take a slice of an iterable by steps of 2.
[...slice(count(), 10, 20, 2)]
// => [10, 12, 14, 16, 18]
Parameters
iterable: Iterable<T>