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

Function Func

iterator.go:285–289  ·  view source on GitHub ↗

Func returns an Iterator from a function.

(fn func() Option[T])

Source from the content-addressed store, hash-verified

283
284// Func returns an Iterator from a function.
285func Func[T any](fn func() Option[T]) Iterator[T] {
286 return &funcIter[T]{
287 fn: fn,
288 }
289}
290
291func (it *funcIter[T]) Next() Option[T] {
292 return it.fn()

Callers 2

TestFuncFunction · 0.85
TestFuseFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestFuncFunction · 0.68
TestFuseFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…