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:
@@ -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)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user