mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-10 00:50:00 +00:00
Nobody wants the long version of finding out if a variable is set.
So switched to the short version with 'orelse'. ;)
This commit is contained in:
@@ -51,8 +51,6 @@ fn visitElephants(first_elephant: *Elephant) void {
|
||||
// We should stop once we encounter a tail that
|
||||
// does NOT point to another element. What can
|
||||
// we put here to make that happen?
|
||||
if (e.tail == null) ???;
|
||||
|
||||
e = e.tail.?;
|
||||
e = e.tail ???
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user