func (s *Set) List() []uint {
	v := make([]uint, 0, s.Size())
	for item := range s.m {
		v = append(v, item)
	}
	return v
}
List returns a slice of all items. There is also StringSlice() and
IntSlice() methods for returning slices of type string or int.
package uset
import (
	"fmt"
	"strings"
)
var (
	keyExists   = struct{}{}
	nonExistent uint
)
const maxInt = int(^uint(0) >> 1)
type Set struct {
	m map[uint]struct{}
}
func New(ts ...uint) *Set {
	s := NewWithSize(len(ts))
	s.Add(ts...)
	return s
}
func NewWithSize(size int) *Set {
	return &Set{make(map[uint]struct{}, size)}
}
func (s *Set) Add(items ...uint) {
	for _, item := range items {
		s.m[item] = keyExists
	}
}
func (s *Set) Remove(items ...uint) {
	for _, item := range items {
		delete(s.m, item)
	}
}
func (s *Set) Pop() uint {
	for item := range s.m {
		delete(s.m, item)
		return item
	}
	return nonExistent
}
func (s *Set) Pop2() (uint, bool) {
	for item := range s.m {
		delete(s.m, item)
		return item, true
	}
	return nonExistent, false
}
func (s *Set) Has(items ...uint) bool {
	has := false
	for _, item := range items {
		if _, has = s.m[item]; !has {
			break
		}
	}
	return has
}
func (s *Set) HasAny(items ...uint) bool {
	has := false
	for _, item := range items {
		if _, has = s.m[item]; has {
			break
		}
	}
	return has
}
func (s *Set) Size() int {
	return len(s.m)
}
func (s *Set) Clear() {
	s.m = make(map[uint]struct{})
}
func (s *Set) IsEmpty() bool {
	return s.Size() == 0
}
func (s *Set) IsEqual(t *Set) bool {
	if s.Size() != t.Size() {
		return false
	}
	equal := true
	t.Each(func(item uint) bool {
		_, equal = s.m[item]
		return equal  
	})
	return equal
}
func (s *Set) IsSubset(t *Set) bool {
	if s.Size() < t.Size() {
		return false
	}
	subset := true
	t.Each(func(item uint) bool {
		_, subset = s.m[item]
		return subset
	})
	return subset
}
func (s *Set) IsSuperset(t *Set) bool {
	return t.IsSubset(s)
}
func (s *Set) Each(f func(item uint) bool) {
	for item := range s.m {
		if !f(item) {
			break
		}
	}
}
func (s *Set) Copy() *Set {
	u := NewWithSize(s.Size())
	for item := range s.m {
		u.m[item] = keyExists
	}
	return u
}
func (s *Set) String() string {
	v := make([]string, 0, s.Size())
	for item := range s.m {
		v = append(v, fmt.Sprintf("%v", item))
	}
	return fmt.Sprintf("[%s]", strings.Join(v, ", "))
}