gods/iters/misc.go
2024-05-19 23:19:55 +05:00

11 lines
132 B
Go

package iters
func ChanToSlice[V any](c chan V) []V {
ret := []V{}
for v := range c {
ret = append(ret, v)
}
return ret
}