Skip to content

Instantly share code, notes, and snippets.

@infynyxx
Created September 26, 2014 16:30
Show Gist options
  • 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