bb/lib/common.go

11 lines
135 B
Go
Raw Normal View History

2022-08-23 18:25:44 +00:00
package lib
func Contains[T comparable](s []T, v T) bool {
for _, x := range s {
if x == v {
return true
}
}
return false
}