Google Gemmi kept insisting it would work. I kept getting compile error at the switch () line.
const Command = enum { Start, Stop };
fn processCommand(maybe_cmd: ?Command) void {
switch (maybe_cmd) {
null => { },
Command.Start => { },
Command.Stop => { },
}
}
pub fn main() !void {
const cmd = Command.Start;
processCommand(cmd);
}