On 6/6/12 10:52 AM, Sebastian Sylvan wrote:
Just a quick question: Can I pass in a multi-statement lambda to a function without using "do" or "for", and if so what does it look like?I'm guessing something like this, but I didn't see it spelled out: foo( |x| { let y = x+1; y+1 });
Yep, that's exactly how it works. It falls out of blocks being expressions. Patrick _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
