     public static let tokyo = City(name: "Tokyo", color: .Red)
     public static let washington = City(name: "Washington", color: .Blue)
 
-    public static var allCards:Set<City> = [algiers, atlanta, baghdad, bangkok, beijing, bogota, buenosaires, cairo, chennai, chicago, delhi, essen, hochiminhcity, hongkong, istanbul, jakarta, johannesburg, karachi, khartoum, kinshasa, kolkata, lagos, lima, london, losangeles, madrid, manila, mexicocity, miami, milan, montreal, moscow, mumbai, newyork, osaka, paris, riyadh, sanfrancisco, santiago, saopaulo, seoul, shanghai, stpetersburg, sydney, taipei, tehran, tokyo, washington]
+    public static var allCards:Set<City> = [algiers, atlanta, baghdad, bangkok, beijing, bogotá, buenosaires, cairo, chennai, chicago, delhi, essen, hochiminhcity, hongkong, istanbul, jakarta, johannesburg, karachi, khartoum, kinshasa, kolkata, lagos, lima, london, losangeles, madrid, manila, mexicocity, miami, milan, montreal, moscow, mumbai, newyork, osaka, paris, riyadh, sanfrancisco, santiago, sãopaulo, seoul, shanghai, stpetersburg, sydney, taipei, tehran, tokyo, washington]
 
-    public static func findByName(name:String) -> [City] {
-        return allCards.findByName(name)
+    /**
+     Finds all cards with names that contain the specified portion of a name.
+     
+     - returns: All cities whose names contain the string `portionOfName` anywhere
+     in their name.
+
+     - remark: It is sufficient to pass just the first 4 characters of any name
+     to ensure uniquenss and to return only one City. For example the following
+     will code will ensure `myCity` gets the value `City.sanfrancisco`.
+     
+     ````
+     let myCity = City.findByName("san ").first!
+     ````
+    */
+    public static func findByName(portionOfName:String) -> [City] {
+        return allCards.findByName(portionOfName)
     }
 
 }


import Foundation

public protocol HasCity {
    var city:City { get }
}

public struct City : Equatable, Hashable {
    public let name:String
    public let color:Color

    public var hashValue:Int {

    public static let riyadh = City(name: "Riyadh", color: .Black)
    public static let sanfrancisco = City(name: "San Francisco", color: .Blue)
    public static let santiago = City(name: "Santiago", color: .Yellow)
    public static let sãopaulo = City(name: "São Paulo", color: .Yellow)
    public static let seoul = City(name: "Seoul", color: .Red)
    public static let shanghai = City(name: "Shanghai", color: .Red)
    public static let stpetersburg = City(name: "St Petersburg", color: .Blue)
