https://stackoverflow.com/questions/36636/what-is-a-closure
fn main() {
let example_closure: fn(&str) = |string_input: &str| {
println!("{}", string_input);
};
example_closure("this is a closure");
}
// 引用& == const *
// 同一个变量的另一个名字
https://stackoverflow.com/questions/36636/what-is-a-closure
fn main() {
let example_closure: fn(&str) = |string_input: &str| {
println!("{}", string_input);
};
example_closure("this is a closure");
}
// 引用& == const *
// 同一个变量的另一个名字
让时间为你证明