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

Function TestForEach

iterator_test.go:111–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

109}
110
111func TestForEach(t *testing.T) {
112 it := Take(Repeat(1), 5)
113 var ret int
114 ForEach(it, func(i int) {
115 ret += i
116 })
117 equals(t, ret, 5)
118}
119
120func TestFold(t *testing.T) {
121 it := Slice([]int{1, 2, 3, 4, 5})

Callers

nothing calls this directly

Calls 4

TakeFunction · 0.85
RepeatFunction · 0.85
ForEachFunction · 0.85
equalsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…