import { array } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { range } = array;
Create a range of numbers with count values, starting at start (default 0) and stepping by step (default 1).
Examples
Example 1
Example 1
import * as A from "./array.ts";
const result1 = A.range(3); // [0, 1, 2]
const result2 = A.range(3, 1); // [1, 2, 3]
const result3 = A.range(3, -1, 0.1); // [-1, -0.9, -0.8]
const result4 = A.range(2.5); // [0, 1]
const result5 = A.range(-1); // []