mirror of
https://github.com/samber/lo.git
synced 2026-04-22 15:37:14 +08:00
fa095e4b4f
* fix(doc): fix go playground demo URL * fix(doc): add more go playground demo URL
482 B
482 B
name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
| name | slug | sourceRef | category | subCategory | signatures | playUrl | variantHelpers | similarHelpers | position | |
|---|---|---|---|---|---|---|---|---|---|---|
| Drain | drain | it/seq.go#L26 | it | sequence |
|
https://go.dev/play/p/xU_GCG861r1 | 170 |
Drain consumes an entire sequence.
collection := func(yield func(int) bool) {
yield(1)
yield(2)
yield(3)
fmt.Println("yielding")
}
it.Drain(collection)
// prints "yielding" three times, sequence is consumed