News for hackers. Stuff that matters.
Re:C++14 lambda tutorial by archgrove on Thursday August 28, 2014 @01:11PM (#8238418)
You might like Apple's Swift:

    class Example {
        let ExtraMul = 5
    }

    let weakly = Example()
    let squareAndABit : Int -> Int = { [weak weakly] in $0 * $0 * weakly!.ExtraMul }
    squareAndABit(2) // 20
Positional lambda arguments, implicit returns for single expression arguments, capture lists if you want to alter the default capture mode. It's got really rather nice first class function support.

There are no comments on this comment yet.