← Back to archive

Stdle #95 · option · 2026-09-09

What does this Rust snippet output?

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

fn main() {
let nums = [Some(1), None, Some(3)];
let total: i32 = nums.iter()
.flatten()
.sum();
println!("{}", total);
}
Option
4 attempts left

Answer & explanation