Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@infynyxx
Created September 26, 2014 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infynyxx/9e7f14fc9ea041af9259 to your computer and use it in GitHub Desktop.
Save infynyxx/9e7f14fc9ea041af9259 to your computer and use it in GitHub Desktop.
proc()
let proc_variable = 25i;
let p = proc() {
proc_variable * proc_variable;
};
println!("proc value is {}", p()); //Outout: proc value is ()
let proc_variable = 25i;
let p = proc() {
proc_variable * proc_variable
};
println!("proc value is {}", p()); //Outout: proc value is 625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment