Guide: closures

They do actually, behind a feature gate. They will soon be non-feature-gated and the old closures removed (i.e. in days or weeks), I don't see much value in focusing on the old paradigm/being specific to it, when it will be utterly outdated soon.

(This applies above too.)

On 4 August 2014 2:16:04 am AEST, Steve Klabnik <notifications@github.com> wrote:
>> +
>> +```{rust}
>> +fn twice(x: int, f: |int| -> int) -> int {
>> +    f(x) + f(x)
>> +}
>> +
>> +fn square(x: int) -> int { x * x }
>> +
>> +fn main() {
>> +    twice(5i, square); // evaluates to 50
>> +}
>> +```
>> +
>> +Doing this is not particularly common, but every once in a while,
>it's useful.
>> +
>> +That's all there is to closures! Closures are a little bit strange
>at first,
>
>Unboxed closures don't exist yet.
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/rust-lang/rust/pull/16206/files#r15735175