From 95d9c8699c252f3dfe1836e93a47718d14983165 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 5 Oct 2012 19:10:41 -0700 Subject: [PATCH] docs: Simplify a tutorial example --- doc/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorial.md b/doc/tutorial.md index d5a2f66b1c0..9688989abc9 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -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