<commit_before>package schema

import (
	"fmt"
	"reflect"
	"sort"
	"sync"
)

// Set is a set data structure that is returned for elements of type
// TypeSet.
type Set struct {
	F SchemaSetFunc

	m    map[int]interface{}
	once sync.Once
}

// NewSet is a convenience method for creating a new set with the given
// items.<commit_msg>Implement a hash function for string sets<commit_after>package schema

import (
	"fmt"
	"reflect"
	"sort"
	"sync"

	"github.com/hashicorp/terraform/helper/hashcode"
)

// HashString hashes strings. If you want a Set of strings, this is the
// SchemaSetFunc you want.
func HashString(v interface{}) int {
	return hashcode.String(v.(string))
}

// Set is a set data structure that is returned for elements of type
// TypeSet.
type Set struct {
	F SchemaSetFunc

	m    map[int]interface{}
	once sync.Once
}

// NewSet is a convenience method for creating a new set with the given
// items.
{'fraction_non_alphanumeric': 0.09368191721132897, 'fraction_numerical': 0.0, 'mean_word_length': 3.5270935960591134, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5483153', 'n_tokens_mistral': 294, 'n_tokens_neox': 292, 'n_words': 116}