1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-08-10 22:31:32 +02:00

docs(iterator): update Cycle function documentation (#128)

This commit is contained in:
sarabande
2025-03-01 16:21:41 -07:00
committed by GitHub
parent 7a3989989b
commit 29200d34dc

View File

@@ -19,8 +19,7 @@ import (
G "github.com/IBM/fp-go/iterator/stateless/generic" G "github.com/IBM/fp-go/iterator/stateless/generic"
) )
// DropWhile creates an [Iterator] that drops elements from the [Iterator] as long as the predicate is true; afterwards, returns every element. // Cycle creates an [Iterator] containing an [Iterator] repeated an infinite number of times.
// Note, the [Iterator] does not produce any output until the predicate first becomes false
func Cycle[U any](ma Iterator[U]) Iterator[U] { func Cycle[U any](ma Iterator[U]) Iterator[U] {
return G.Cycle[Iterator[U]](ma) return G.Cycle[Iterator[U]](ma)
} }