News for hackers. Stuff that matters.
Re:Python with Braces by masklinn on Monday July 08, 2024 @01:03PM (#40907135)
Also common to set up "capture clauses" for lambdas as Rust does not have that in the language, IME most common with threads:

    spawn({
        let a = a.clone();
        let b = &b;
        move || {
            // do something with the a you cloned and the b you borrowed
        }
    })

There are no comments on this comment yet.