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
var evens = [Int]()
for x in 1..<10 where x % 2 == 0 {
evens.append(x)
}
// or directly filtering Range due to default implementations in protocols (now a method)
let evens = (0..<10).filter{ $0 % 2 == 0 }