This topic takes a problem-first approach to learning Zig. Instead of memorizing syntax in isolation, you'll reach for Zig's distinctive features — slices, optionals, error unions, allocators, comptime — exactly when a problem calls for them.
The 66 exercises are grouped into six themed decks, each building on the one before:
?T, !T, orelse, try, custom error sets, and exhaustive switch.defer/errdefer, and building stacks, queues, lists, and trees that own their memory.comptime, then three capstones that combine parsing, allocation, and error handling in one program.Every card is a small function you implement against a test suite you run in the browser. Solutions are one click away when you're stuck, and the edge cases in each test teach as much as the happy path.
By the end, you'll have both solid Zig fundamentals — memory you manage on purpose, errors you can't ignore — and a toolkit of solutions to common programming challenges.