// 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() { return anyMultipleOf($0, numbers: [3, 5]) }.reduce(0) { $0 + $1 } print(sum)