 
 /// Sequence conformance.
 extension Set : SequenceType {
-	func generate() -> GeneratorOf<Element> {
+	public func generate() -> GeneratorOf<Element> {
 		var generator = _dictionary.keys.generate()
 		return GeneratorOf {
 			return generator.next()



/// Creates and returns the union of \c set and \c sequence.
func + <S : SequenceType> (set: Set<S.Generator.Element>, sequence: S) -> Set<S.Generator.Element> {
	var union = Set(set)
	union += sequence
	return union

//  Copyright (c) 2014 Rob Rix. All rights reserved.

/// A set of unique elements.
public struct Set<Element : Hashable> {
	var _dictionary: Dictionary<Element, Unit> = [:]
	
	public init<S : SequenceType where S.Generator.Element == Element>(_ sequence: S) {
		extend(sequence)
	}
	
	public init() {}
	
	
	public var count: Int { return _dictionary.count }
	
	public func contains(element: Element) -> Bool {
		return _dictionary[element] != nil
	}
	
	public mutating func insert(element: Element) {
		_dictionary[element] = Unit()
	}
	
	public mutating func remove(element: Element) {
		_dictionary.removeValueForKey(element)
	}
}
