QuixiAI shows a delightfully terse FizzBuzz using tuple pattern matching
QuixiAI · x · 2026-11-03
QuixiAI shared a compact FizzBuzz implementation: a for i in 1..=100 loop that pattern-matches on the tuple (i % 3, i % 5), mapping (0,0), (0,) and (,0) to "FizzBuzz", "Fizz" and "Buzz", with a catch-all printing the number, piped to print. A nice showcase of how far pattern matching can compress branching logic.
More from coding & agent
- MIT-licensed frontend skill gives coding agents a 7-step design and verification workflow — Extra-Highlight9183 · 2026-11-03
- Trajectory launches post-training platform with GS1 and Continual Graders research previews — simonguozirui · 2026-11-03
- SMBs are rebuilding their entire GTM stack with agent-native tools, says new thread — garrytan · 2026-11-03
- Compacting Claude Code at 400K instead of 967K cut this dev's cost per request by 43% — Awkward-Let-4628 · 2026-11-03
- Capy 0.7.0 ships Captains orchestration GA; YC's Garry Tan reports 5X issue-fixing throughput — garrytan · 2026-11-03
- OpenAI builds Pando, a new Git backend that cut push latency ~80% serving ~1PB daily — OpenAIDevs · 2026-11-03