diff options
Diffstat (limited to 'exercises/049_quiz6.zig')
| -rw-r--r-- | exercises/049_quiz6.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/exercises/049_quiz6.zig b/exercises/049_quiz6.zig index 9dbea51..2da18de 100644 --- a/exercises/049_quiz6.zig +++ b/exercises/049_quiz6.zig @@ -27,7 +27,13 @@ const Elephant = struct { // 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); + } // --------------------------------------------------- |
