chore: organization day19

This commit is contained in:
xuu
2023-12-30 19:46:23 -07:00
parent 39c6f8ed4d
commit 62f8338227
2 changed files with 182 additions and 95 deletions

9
set.go
View File

@@ -57,3 +57,12 @@ func (m *defaultMap[K, V]) Items() []pair[K, V] {
}
return items
}
func In[C comparable](n C, haystack ...C) bool {
for _, h := range haystack {
if n == h {
return true
}
}
return false
}