MCPcopy Index your code
hub / github.com/Effect-TS/effect / range

Function range

packages/effect/src/Iterable.ts:72–79  ·  view source on GitHub ↗
(start: number, end?: number)

Source from the content-addressed store, hash-verified

70 * @since 2.0.0
71 */
72export const range = (start: number, end?: number): Iterable<number> => {
73 if (end === undefined) {
74 return makeBy((i) => start + i)
75 }
76 return makeBy((i) => start + i, {
77 length: start <= end ? end - start + 1 : 1
78 })
79}
80
81/**
82 * Return a `Iterable` containing a value repeated the specified number of times.

Callers

nothing calls this directly

Calls 1

makeByFunction · 0.85

Tested by

no test coverage detected