mirror of
https://github.com/github/semantic.git
synced 2024-12-29 01:42:43 +03:00
Fix hashing.
This commit is contained in:
parent
96e5cd0e7a
commit
bccc09d39b
@ -25,3 +25,12 @@ extension Fix {
|
|||||||
public func == <A: Equatable> (left: Fix<A>, right: Fix<A>) -> Bool {
|
public func == <A: Equatable> (left: Fix<A>, right: Fix<A>) -> Bool {
|
||||||
return Fix.equals(==)(left, right)
|
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) })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user