aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-02-16 20:21:32 -0500
committerDave Gauer <dave@ratfactor.com>2021-02-16 20:21:32 -0500
commite32bd7ce30c8548884289483951395d4e7a4a0b7 (patch)
treeee6c37ade9eec421628fc0d623d6fb1dcd0fd941 /patches
parent62fc8f7139a348346c7befde7cccff3076dc8cc6 (diff)
downloadziglings-e32bd7ce30c8548884289483951395d4e7a4a0b7.tar.gz
ziglings-e32bd7ce30c8548884289483951395d4e7a4a0b7.tar.bz2
ziglings-e32bd7ce30c8548884289483951395d4e7a4a0b7.tar.xz
ziglings-e32bd7ce30c8548884289483951395d4e7a4a0b7.zip
Added ex. 46 optionals 2 - elephants!
Diffstat (limited to 'patches')
-rw-r--r--patches/patches/46_optionals2.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/patches/patches/46_optionals2.patch b/patches/patches/46_optionals2.patch
new file mode 100644
index 0000000..18284da
--- /dev/null
+++ b/patches/patches/46_optionals2.patch
@@ -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;