Skip to content

Instantly share code, notes, and snippets.

@oisdk
Created December 16, 2015 23:36
Show Gist options
  • Save oisdk/e67f59cbc86998251f56 to your computer and use it in GitHub Desktop.
Save oisdk/e67f59cbc86998251f56 to your computer and use it in GitHub Desktop.
func ==<H: Hashable, E: Equatable>(lhs: [H:E]?, rhs: [H:E]?) -> Bool {
switch (lhs,rhs) {
case let (a?,b?): return a == b
case (nil,nil): return true
default: return false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment