1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Remove Cofree hashing.

This commit is contained in:
Rob Rix 2015-10-15 09:43:23 -04:00
parent db6d485f82
commit 8b5a269d5e

View File

@ -76,21 +76,6 @@ public func == <A: Equatable, B: Equatable> (left: Cofree<A, B>, right: Cofree<A
}
// MARK: - Hashing
extension Cofree {
public func hash(annotation annotation: B -> Hash, leaf: A -> Hash) -> Hash {
return .Ordered([ annotation(extract), unwrap.hash(ifLeaf: leaf, ifRecur: { $0.hash(annotation: annotation, leaf: leaf) }) ])
}
}
extension Cofree where A: Hashable, B: Hashable {
public var hash: Hash {
return hash(annotation: Hash.init, leaf: Hash.init)
}
}
// MARK: - JSON
extension Cofree {