diff options
| author | Dave Gauer <[email protected]> | 2021-04-22 10:31:05 -0400 |
|---|---|---|
| committer | Dave Gauer <[email protected]> | 2021-04-22 10:31:05 -0400 |
| commit | 647f46194370eaef3f51aa4cbd38bbd57c33d79f (patch) | |
| tree | d2e81736dcf29ff73e21a4778c8893729bd0d951 | |
| parent | 0ec635fa56f0c057f64691abcb5140858f97df52 (diff) | |
| download | ziglings-647f46194370eaef3f51aa4cbd38bbd57c33d79f.tar.xz ziglings-647f46194370eaef3f51aa4cbd38bbd57c33d79f.zip | |
Adding traditional program debugging capability to RubberDuck
| -rw-r--r-- | exercises/070_comptime5.zig | 6 | ||||
| -rw-r--r-- | patches/patches/070_comptime5.patch | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/exercises/070_comptime5.zig b/exercises/070_comptime5.zig index 7934326..89367bd 100644 --- a/exercises/070_comptime5.zig +++ b/exercises/070_comptime5.zig @@ -52,6 +52,12 @@ const RubberDuck = struct { fn quack(self: RubberDuck) void { print("\"Squeek!\" ", .{}); } + + fn listen(self: RubberDuck, dev_talk: []const u8) void { + // Listen to developer talk about programming problem. + // Silently contemplate problem. Emit helpful sound. + self.quack(); + } }; const Duct = struct { diff --git a/patches/patches/070_comptime5.patch b/patches/patches/070_comptime5.patch index 1c56719..394d9f1 100644 --- a/patches/patches/070_comptime5.patch +++ b/patches/patches/070_comptime5.patch @@ -1,4 +1,4 @@ -116,117c116,117 +122,123c122,123 < const walks_like_duck = ???; < const quacks_like_duck = ???; --- |
