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

Function Repeat

iterator.go:259–263  ·  view source on GitHub ↗

Repeat returns an Iterator that repeatedly returns the same value.

(value T)

Source from the content-addressed store, hash-verified

257
258// Repeat returns an Iterator that repeatedly returns the same value.
259func Repeat[T any](value T) Iterator[T] {
260 return &repeatIter[T]{
261 value: value,
262 }
263}
264
265func (it *repeatIter[T]) Next() Option[T] {
266 return Some(it.value)

Callers 5

TestRepeatFunction · 0.85
TestTakeFunction · 0.85
TestMapFunction · 0.85
TestToSliceFunction · 0.85
TestForEachFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestRepeatFunction · 0.68
TestTakeFunction · 0.68
TestMapFunction · 0.68
TestToSliceFunction · 0.68
TestForEachFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…