← Back to archive

Stdle #52 · closures · 2026-07-28

What does this Rust snippet output?

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

fn main() {
let limit = 3;
let check = move |n: i32| n < limit;
let limit = 100;
println!("{} {}", check(5), limit);
}
Closures
4 attempts left

Answer & explanation