1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 09:21:35 +03:00

Fix hashing.

This commit is contained in:
Rob Rix 2015-10-02 16:31:10 -04:00
parent 96e5cd0e7a
commit bccc09d39b

View File

@ -25,3 +25,12 @@ extension Fix {
public func == <A: Equatable> (left: Fix<A>, right: Fix<A>) -> Bool {
return Fix.equals(==)(left, right)
}
// MARK: - Hashing
extension Fix {
public func hash(param: A -> Hash) -> Hash {
return out.hash(ifLeaf: param, ifRecur: { $0.hash(param) })
}
}