11 lines
135 B
Go
11 lines
135 B
Go
package lib
|
|
|
|
func Contains[T comparable](s []T, v T) bool {
|
|
for _, x := range s {
|
|
if x == v {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|