docs: Simplify a tutorial example

This commit is contained in:
Brian Anderson 2012-10-05 19:10:41 -07:00
parent 28c45601b2
commit 95d9c8699c

View File

@ -1558,7 +1558,7 @@ access local variables in the enclosing scope.
~~~~
let mut max = 0;
(~[1, 2, 3]).map(|x| if *x > max { max = *x });
[1, 2, 3].map(|x| if *x > max { max = *x });
~~~~
Stack closures are very efficient because their environment is