Skip to content

Instantly share code, notes, and snippets.

@bstrie
Created October 17, 2012 20:50
Show Gist options
  • Save bstrie/3908094 to your computer and use it in GitHub Desktop.
Save bstrie/3908094 to your computer and use it in GitHub Desktop.
fn main() {
let x = 1;
let f = fn@() -> int {
return x+20;
};
let mut x = move x;
io::println(f().to_str());
x += 1;
io::println(f().to_str());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment