A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-3.rs
1fnmain(){
2letbase=7;
3letshow=||base+1;
4letr=show();
5println!("{} {}",r,base);
6}
Closures
Answer & explanation
Console output
8 7
Why
The closure reads `base` without a `move`, so it captures a shared reference and does not consume or alter the value. `show()` returns 8, and `base` is still usable and prints 7. Reading a `Copy` value through a closure leaves the original intact.