mirror of
https://github.com/peridotbuild/peridot.git
synced 2024-06-04 01:00:17 +00:00
12 lines
137 B
Go
12 lines
137 B
Go
package base
|
|
|
|
func Contains[T comparable](s []T, e T) bool {
|
|
for _, a := range s {
|
|
if a == e {
|
|
return true
|
|
}
|
|
}
|
|
|
|
return false
|
|
}
|