diff options
Diffstat (limited to 'set.go')
-rw-r--r-- | set.go | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -1,16 +0,0 @@ -package main - -type Set[T comparable] map[T]bool - -func (s Set[T]) Contain(val T) bool { - _, ok := s[val] - return ok -} - -func (s Set[T]) Insert(val T) { - s[val] = true -} - -func (s Set[T]) Erase(val T) { - delete(s, val) -} |