aboutsummaryrefslogtreecommitdiff
path: root/docs/enums.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/enums.md
parentd60962ab5de970a9ce0893df4154b8a0b3ea646a (diff)
Update docs
Diffstat (limited to 'docs/enums.md')
-rw-r--r--docs/enums.md12
1 files changed, 4 insertions, 8 deletions
diff --git a/docs/enums.md b/docs/enums.md
index 27ebdb86..85e82f36 100644
--- a/docs/enums.md
+++ b/docs/enums.md
@@ -34,10 +34,8 @@ an `else` block to handle all unmatched patterns.
Tags can also be quickly checked using the `.TagName` field:
```tomo
->> a.AnInteger
-= yes
->> a.TwoWords
-= no
+assert a.AnInteger != none
+assert a.TwoWords == none
```
## Reducing Boilerplate
@@ -62,10 +60,8 @@ func increment(arg:ArgumentType -> ReturnType)
...
->> increment(AnInt(5))
-= AnInt(6)
->> increment(SomeText("HI"))
-= Nothiing
+assert increment(AnInt(5)) == AnInt(6)
+assert increment(SomeText("HI")) == Nothiing
```
This lets us have overlapping tag names for different types, but smartly infer