func (s *Set) List() []interface{} {
	result := make([]interface{}, len(s.m))
	for i, k := range s.listCode() {
		result[i] = s.m[k]
	}
	return result
}
List returns the elements of this set in slice format.

The order of the returned elements is deterministic. Given the same
set, the order of this will always be the same.
package schema
import (
	"bytes"
	"fmt"
	"reflect"
	"sort"
	"strconv"
	"sync"
	"github.com/hashicorp/terraform/helper/hashcode"
)
func HashString(v interface{}) int {
	return hashcode.String(v.(string))
}
func HashResource(resource *Resource) SchemaSetFunc {
	return func(v interface{}) int {
		var buf bytes.Buffer
		SerializeResourceForHash(&buf, v, resource)
		return hashcode.String(buf.String())
	}
}
func HashSchema(schema *Schema) SchemaSetFunc {
	return func(v interface{}) int {
		var buf bytes.Buffer
		SerializeValueForHash(&buf, v, schema)
		return hashcode.String(buf.String())
	}
}
type Set struct {
	F SchemaSetFunc
	m    map[string]interface{}
	once sync.Once
}
func NewSet(f SchemaSetFunc, items []interface{}) *Set {
	s := &Set{F: f}
	for _, i := range items {
		s.Add(i)
	}
	return s
}
func CopySet(otherSet *Set) *Set {
	return NewSet(otherSet.F, otherSet.List())
}
func (s *Set) Add(item interface{}) {
	s.add(item, false)
}
func (s *Set) Remove(item interface{}) {
	s.remove(item)
}
func (s *Set) Contains(item interface{}) bool {
	_, ok := s.m[s.hash(item)]
	return ok
}
func (s *Set) Len() int {
	return len(s.m)
}