← Back to archive

Stdle #102 · iteration · 2026-09-16

What does this Ruby snippet output?

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

enum = [1, 2, 3].lazy.select { |x| x.odd? }.map { |x| x * 10 }
puts enum.first(2).inspect
Iteration
4 attempts left

Answer & explanation