func (s *Set) Len() int {
	s.RLock()
	defer s.RUnlock()
	return len(s.lookup)
}
Len returns the size of the set right now.
package set
import (
	"errors"
	"strings"
	"sync"
)
var ErrCollision = errors.New("key already exists")
var ErrMissing = errors.New("item does not exist")
var ZeroValue = struct{}{}
type Interface interface {
	Clear() int
	Each(fn IterFunc) error
	Add(item Item) error
	Set(item Item) error
	Get(key string) (Item, error)
	In(key string) bool
	Len() int
	ListPrefix(prefix string) []Item
	Remove(key string) error
	Replace(oldKey string, item Item) error
}
type IterFunc func(key string, item Item) error
type Set struct {
	sync.RWMutex
	lookup    map[string]Item
	normalize func(string) string
}
func New() *Set {
	return &Set{
		lookup:    map[string]Item{},
		normalize: normalize,
	}
}
func (s *Set) Clear() int {
	s.Lock()
	n := len(s.lookup)
	s.lookup = map[string]Item{}
	s.Unlock()
	return n
}