Erica Sadun notes that Swift will let you create an array of tuples: let a: [(Int, Int)] = [(1, 2), (3, 4)] But you can’t use the contains() method: a.contains((3, 4)) // no! Its definition looks like: extension SequenceType where Generator.Element : Equatable { /// Returns `true` iff `element` is in `self`. @warn_unused_result public func … Continue reading Swift Tuples Aren’t Equatable
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed