Add solutions
This commit is contained in:
parent
7417f01d5d
commit
b056b6ad81
96 changed files with 229 additions and 166 deletions
|
|
@ -27,7 +27,13 @@ const Elephant = struct {
|
|||
// Your Elephant trunk methods go here!
|
||||
// ---------------------------------------------------
|
||||
|
||||
???
|
||||
pub fn getTrunk(me: *Elephant) *Elephant {
|
||||
return me.trunk.?;
|
||||
}
|
||||
|
||||
pub fn hasTrunk(me: *Elephant) bool {
|
||||
return me.trunk != null;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue