← Back to archive

Stdle #7 · 2026-06-13

What does this log?

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

const std = @import("std");
fn double(x: anytype) @TypeOf(x) {
return x * 2;
}
pub fn main() void {
std.debug.print("{d}\n", .{double(@as(u8, 21))});
std.debug.print("{d}\n", .{double(@as(i32, -5))});
}
Comptime
2 lines
4 attempts left

Answer & explanation