1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 11:04:00 +03:00

Remove a redundant lazy.

`Dictionary.keys` is already lazy.
This commit is contained in:
Rob Rix 2015-10-19 12:29:12 -04:00
parent e4a0fa0654
commit f1407d7110

View File

@ -59,7 +59,7 @@ extension Syntax {
case let (.Indexed(v1), .Indexed(v2)):
return v1.count == v2.count && zip(v1, v2).lazy.map(ifRecur).reduce(true) { $0 && $1 }
case let (.Keyed(d1), .Keyed(d2)):
return Set(d1.keys) == Set(d2.keys) && d1.keys.lazy.map { ifRecur(d1[$0]!, d2[$0]!) }.reduce(true) { $0 && $1 }
return Set(d1.keys) == Set(d2.keys) && d1.keys.map { ifRecur(d1[$0]!, d2[$0]!) }.reduce(true) { $0 && $1 }
default:
return false
}