Created
September 26, 2014 16:30
-
-
Save infynyxx/9e7f14fc9ea041af9259 to your computer and use it in GitHub Desktop.
proc()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let proc_variable = 25i; | |
let p = proc() { | |
proc_variable * proc_variable; | |
}; | |
println!("proc value is {}", p()); //Outout: proc value is () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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