mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
Added ex. 46 optionals 2 - elephants!
This commit is contained in:
11
patches/patches/46_optionals2.patch
Normal file
11
patches/patches/46_optionals2.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
12c12
|
||||
< tail: *Elephant = undefined, // <---- make this optional!
|
||||
---
|
||||
> tail: ?*Elephant = undefined,
|
||||
39,42c39
|
||||
< // 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) ???;
|
||||
---
|
||||
> if (e.tail == null) break;
|
||||
Reference in New Issue
Block a user