aboutsummaryrefslogtreecommitdiff
path: root/docs/optionals.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-29 15:56:02 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-29 15:56:02 -0500
commit97047cb95a88228ddefbc83b4c50b05eaf048272 (patch)
treefb6a57ef6c6fd8e18aba8b8c3e3c6bbf83d61ec6 /docs/optionals.md
parentd60962ab5de970a9ce0893df4154b8a0b3ea646a (diff)
Update docs
Diffstat (limited to 'docs/optionals.md')
-rw-r--r--docs/optionals.md9
1 files changed, 3 insertions, 6 deletions
diff --git a/docs/optionals.md b/docs/optionals.md
index 131daf19..326d77b5 100644
--- a/docs/optionals.md
+++ b/docs/optionals.md
@@ -90,14 +90,11 @@ an `Abort` type like `fail()` or `exit()`:
```tomo
maybe_x : Int? = 5
->> maybe_x or -1
-= 5 : Int
->> maybe_x or fail("No value!")
-= 5 : Int
+assert (maybe_x or -1) == 5
+assert (maybe_x or fail("No value!")) == 5
maybe_x = none
->> maybe_x or -1
-= -1 : Int
+assert (maybe_x or -1) == -1
>> maybe_x or fail("No value!")
# Failure!