aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/patches/patches/049_quiz6.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/patches/049_quiz6.patch')
-rw-r--r--patches/patches/049_quiz6.patch29
1 files changed, 18 insertions, 11 deletions
diff --git a/patches/patches/049_quiz6.patch b/patches/patches/049_quiz6.patch
index 83f9faf..0c7bbc3 100644
--- a/patches/patches/049_quiz6.patch
+++ b/patches/patches/049_quiz6.patch
@@ -1,11 +1,18 @@
-28a29,31
-> pub fn getTrunk(self: *Elephant) *Elephant {
-> return self.trunk.?;
-> }
-30,31c33,35
-< ???
-<
----
-> pub fn hasTrunk(self: *Elephant) bool {
-> return (self.trunk != null);
-> }
+--- exercises/049_quiz6.zig 2023-10-03 22:15:22.122241138 +0200
++++ answers/049_quiz6.zig 2023-10-05 20:04:07.062767005 +0200
+@@ -26,9 +26,13 @@
+
+ // Your Elephant trunk methods go here!
+ // ---------------------------------------------------
++ pub fn getTrunk(self: *Elephant) *Elephant {
++ return self.trunk.?;
++ }
+
+- ???
+-
++ pub fn hasTrunk(self: *Elephant) bool {
++ return (self.trunk != null);
++ }
+ // ---------------------------------------------------
+
+ pub fn visit(self: *Elephant) void {