import { range } from "https://deno.land/x/proc@0.20.22/src/utility.ts";
Lazily produce a range of numbers.
There are two forms:
- from/to/step:
to
is exclusive, and - from/until/step:
until
is inclusive.
Example
const result = await range({to: 10}).collect();
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Parameters
options: RangeToOptions | RangeUntilOptions
Range options.
Returns
Enumerable<number>