Added ex. 46 optionals 2 - elephants!

This commit is contained in:
Dave Gauer 2021-02-16 20:21:32 -05:00
parent 62fc8f7139
commit e32bd7ce30
4 changed files with 64 additions and 1 deletions

View 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;