mirror of
https://github.com/tursom/GoCollections.git
synced 2025-03-15 18:36:56 +08:00
15 lines
195 B
Go
15 lines
195 B
Go
package lang
|
|
|
|
func Nil[T any]() T {
|
|
var n T
|
|
return n
|
|
}
|
|
|
|
func Len[T any](array []T) int {
|
|
return len(array)
|
|
}
|
|
|
|
func Append[T any](slice []T, elems ...T) []T {
|
|
return append(slice, elems...)
|
|
}
|