From 97047cb95a88228ddefbc83b4c50b05eaf048272 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 29 Nov 2025 15:56:02 -0500 Subject: Update docs --- docs/optionals.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'docs/optionals.md') 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! -- cgit v1.2.3