← Back to archive

Stdle #33 · closures · 2026-07-09

What does this Rust snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

fn main() {
let f: fn(i32) -> i32 = |x| x + 1;
println!("{}", f(41));
}
Closures
4 attempts left

Answer & explanation