Hashable and Set in Swift
Issue #122
From Set
You can create a set with any element type that conforms to the Hashable protocol. By default, most types in the standard library are hashable, including strings, numeric and Boolean types, enumeration cases without associated values, and even sets themselves.
From Hashable
The Hashable protocol inherits from the Equatable protocol, so you must also add an equal-to operator (==) function for your custom type.
1 | public protocol Hashable : Equatable { |