nothing to see here

set: introduce set difference

Signed-off-by: oppiliappan <me@oppi.li>

authored by oppi.li and committed by Tangled 1f3579fd ba5233f0

Changed files
+11
+11
set.go
··· 44 44 } 45 45 return result 46 46 } 47 + 48 + // Difference returns a new set with elements in s but not in other. 49 + func (s Set[T]) Difference(other Set[T]) Set[T] { 50 + result := New[T]() 51 + for k := range s { 52 + if _, ok := other[k]; !ok { 53 + result.Add(k) 54 + } 55 + } 56 + return result 57 + }