slices/flat.go

10 lines
136 B
Go
Raw Normal View History

2022-09-06 01:58:19 +02:00
package slices
func Flat[T any](s ...[]T) []T {
out := make([]T, 0)
for _, v := range s {
out = append(out, v...)
}
return out
}