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

Function Fuse

iterator.go:348–353  ·  view source on GitHub ↗

Fuse returns an Iterator adapter that will keep yielding None after the underlying Iterator has yielded None once.

(it Iterator[T])

Source from the content-addressed store, hash-verified

346// Fuse returns an Iterator adapter that will keep yielding None after the
347// underlying Iterator has yielded None once.
348func Fuse[T any](it Iterator[T]) Iterator[T] {
349 return &fuseIter[T]{
350 inner: it,
351 done: false,
352 }
353}
354
355func (it *fuseIter[T]) Next() Option[T] {
356 if it.done {

Callers 2

TestFuseFunction · 0.85
ChainFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestFuseFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…