A quick multiple-choice check before you move on. Answer every question, then submit to see how you did.
1.A closure only reads a captured String (it prints it but never mutates or moves it). Which capture mode does the compiler choose by default, and what happens to the original variable?
2.What does the move keyword actually change about a closure?
3.A closure captures a String by value and returns it (moving s out of the closure). Which of the callable traits does it implement?
4.You are writing a function that stores many *different* closures of type Fn(i32) -> i32 together in a single Vec. Which parameter/element type makes this work?
5.In Rust, a closure that mutates a captured count holds a &mut borrow of it while the closure is still alive, which is why reading count between two calls to the closure fails to compile. How does the theory contrast this with C#?