The language guide has revealed no trace of list comprehension. What\'s the neatest way of accomplishing this in Swift? I\'m looking for something similar t
One way would be :
var evens: Int[]() for x in 0..<10 { if x%2 == 0 {evens += x} // or evens.append(x) }