Skip to content

Instantly share code, notes, and snippets.

@eldesperado
Created November 9, 2015 03:52
Show Gist options
  • Save eldesperado/a8c81ee0115c21e39092 to your computer and use it in GitHub Desktop.
Save eldesperado/a8c81ee0115c21e39092 to your computer and use it in GitHub Desktop.
Conforming types may be used in switch statements and as the element of a Set.
extension <# extendedType #> : Hashable {
var hashValue: Int { return <# hashValue #> }
}
func ==(lhs: <# extendedType #>, rhs: <# extendedType #>) -> Bool {
return <# comparator #>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment