Looking through the hashable protocol, and to make a matrix location struct to conform:
struct MatrixLocation: Hashable {
let row: Int
let col: Int
var hashValue: Int { return row.hashValue ^ col.hashValue }
}
The hash value has the ^
operator.
What is the ^
operator in Swift?