@effect-ts/system
Version:
Effect-TS is a zero dependency set of libraries to write highly productive, purely functional TypeScript at scale.
16 lines (13 loc) • 371 B
text/typescript
// ets_tracing: off
import type { Chunk } from "../core.js"
import { append_, empty } from "../core.js"
/**
* Build a chunk with an integer range with both min/max included
*/
export function range(min: number, max: number): Chunk<number> {
let builder = empty<number>()
for (let i = min; i <= max; i++) {
builder = append_(builder, i)
}
return builder
}