MCPcopy Create free account
hub / github.com/Soft/iter / Range

Function Range

iterator.go:36–43  ·  view source on GitHub ↗

Range returns an Iterator over a range of integers.

(start, stop, step int)

Source from the content-addressed store, hash-verified

34
35// Range returns an Iterator over a range of integers.
36func Range(start, stop, step int) Iterator[int] {
37 return &rangeIter{
38 start: start,
39 stop: stop,
40 step: step,
41 i: 0,
42 }
43}
44
45func (it *rangeIter) Next() Option[int] {
46 v := it.start + it.step*it.i

Callers 1

TestRangeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestRangeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…