Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

closure Rust

fn main() {
	let power = |x, y| {
    	return i32::pow(x, y);
    };
    
    println!("{}", power(10, 2)) // prints 100
}
 
PREVIOUS NEXT
Tagged: #closure #Rust
ADD COMMENT
Topic
Name
5+3 =