v0.3.10 #7

Merged
ScuroNeko merged 12 commits from dev into main 2026-02-04 17:33:55 +03:00
Showing only changes of commit 55d4065259 - Show all commits

View File

@@ -148,6 +148,15 @@ func (s Set[T]) Remove(el T) Set[T] {
}
return s.Pop(index)
}
func (s Set[T]) Filter(f func(e T) bool) Set[T] {
out := make(Set[T], 0)
for _, v := range s {
if f(v) {
out = append(out, v)
}
}
return out
}
func (s Set[T]) ToSlice() Slice[T] {
out := make(Slice[T], s.Len())
copy(out, s)