Zig Iterators 28 October 2025·3 mins Language/Zig Zig/0.15.1 Zig/Comptime Zig/Slice Writing a custom iterator in Zig for a generic Slice type, with a next() method that returns an optional so you can loop over it with while.