import type { ArrayLikeIterable } from "@thi.ng/api" ; import { map } from "./map.js" ; import { permutations } from "./permutations.js" ; import { range , Range } from "./range.js" ; import { zip } from "./zip.js" ; example param vec export const rangeNd = ( min , max ? ) => permutations . apply ( null , < Range [ ] > ( ( max ? [ ... map ( ( [ a , b ] ) => range ( a , b ) , zip ( min , max ) ) ] : [ ... map ( range , min ) ] ) ) ) ;