mirror of
https://github.com/samber/lo.git
synced 2026-04-22 23:47:11 +08:00
593 B
593 B
name, slug, sourceRef, category, subCategory, signatures, variantHelpers, similarHelpers, position
| name | slug | sourceRef | category | subCategory | signatures | variantHelpers | similarHelpers | position | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ToAnySeq | toanyseq | it/type_manipulation.go#L11 | it | type |
|
|
|
243 |
ToAnySeq returns a sequence with all elements mapped to any type.
collection := func(yield func(int) bool) {
yield(1)
yield(2)
yield(3)
}
anySeq := it.ToAnySeq(collection)
var result []any
for item := range anySeq {
result = append(result, item)
}
// result contains [1, 2, 3] as any type