{ (game: Game) -> Bool in game.highestScore == highestScore && game.playedCount == playedCount }
closure is equivalent to:{ $0.highestScore == highestScore && $1.playedCount == playedCount }
.{ $0.highestScore == highestScore && $0.playedCount == playedCount }
.{ 0 -> 0.highestScore == highestScore && 0.playedCount == playedCount }
.
closure { return condition($0) }
is equivalent to:{ (number: Int) -> Bool in return condition(number) }
.{ (number -> Bool) -> Int in condition <- (number) }
.{ 0 -> condition(number) }
.
var condition: { 0 -> Int -> Bool }
.var condition: Int $0 returns Bool
.var condition: ((Int) -> Bool)
.
var tuple: (key: String, value: String) = ("Name", "Garfield")
, which of the following lines accesses the first string element in the tuple, that is, the value named key?tuple.$0
.tuple.1
.tuple.0
.
18.224.54.255