diff --git a/exercises/028_defer2.zig b/exercises/028_defer2.zig index 35c1326..322a06b 100644 --- a/exercises/028_defer2.zig +++ b/exercises/028_defer2.zig @@ -15,6 +15,10 @@ pub fn main() void { // This function is _supposed_ to print an animal name in parentheses // like "(Goat) ", but we somehow need to print the end parenthesis // even though this function can return in four different places! + +// In zigling 027 runLater() is said to run when the block, within which runLater() is defined, has finished. +// In zigling 028 the block seems to be the function printAnimal, within which the to be defered print function is formulated, but the defer runs after every if{} block; +// Shoud the explantion in the comments of 027 be reformulated? fn printAnimal(animal: u8) void { std.debug.print("(", .{});