objcio / functional-swift

Issue repository for the Functional Swift book
http://www.objc.io/books/fpinswift
927 stars 133 forks source link

Chapter 4, function computeBoolArray #106

Closed Taarna closed 8 years ago

Taarna commented 8 years ago

result should be var, not let.

func computeBoolArray(xs: [Int], f: Int -> Bool) -> [Bool] {
    let result: [Bool] = []
    for x in xs {
        result.append(f(x))
    }
    return result
}
floriankugler commented 8 years ago

Fixed in the next update... thanks!