A few re-organizations.

This commit is contained in:
Matt T. Proud 2012-11-29 20:55:30 +01:00
parent 43aeba2699
commit c0ce859c76
4 changed files with 134 additions and 120 deletions

View file

@ -26,7 +26,7 @@ func (s Set) Remove(v interface{}) {
func (s Set) Elements() []interface{} {
result := make([]interface{}, 0, len(s))
for k, _ := range s {
for k := range s {
result = append(result, k)
}
@ -42,7 +42,7 @@ func (s Set) Has(v interface{}) bool {
func (s Set) Intersection(o Set) Set {
result := make(Set)
for k, _ := range s {
for k := range s {
if o.Has(k) {
result[k] = true
}