This commit is contained in:
Adam Millerchip 2021-12-31 00:06:33 +09:00
parent c00afe039c
commit deb14e7aff
1 changed files with 7 additions and 1 deletions

View File

@ -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);
}
// ---------------------------------------------------