// Project Euler #1 Solution in Swift func anyMultipleOf(value: Int, numbers: [Int]) -> Bool { return numbers.reduce(false) { any, number in return any || ((value % number) == 0) } } let sum = [Int](1..<1000).filter() { anyMultipleOf($0, [3, 5]) }.reduce(0) { $0 + $1 } println(sum)