aboutsummaryrefslogtreecommitdiff
path: root/TUTORIAL.md
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-05 12:18:11 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-05 12:18:11 +0300
commit7be78efb6c56c04b8a96b3f4f7f6cf810da04dbf (patch)
tree47f8a8ba81e93dc9175b2c48f9f6387f797dd94a /TUTORIAL.md
parentbf458367d77cb4ca3f4ac0a4a8c9ffe13f71b09b (diff)
downloadmyslip-7be78efb6c56c04b8a96b3f4f7f6cf810da04dbf.tar.gz
myslip-7be78efb6c56c04b8a96b3f4f7f6cf810da04dbf.zip
Fixed type of Not, added documentation to the tour for booleans
Diffstat (limited to 'TUTORIAL.md')
-rw-r--r--TUTORIAL.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/TUTORIAL.md b/TUTORIAL.md
index 7389d55..9494859 100644
--- a/TUTORIAL.md
+++ b/TUTORIAL.md
@@ -34,6 +34,46 @@ Decimals are truncated in division:
```
+**Booleans**
+
+Myslip supports booleans and `and`, `or`, `xor` and `not`
+for their comparisons.
+```console
+> true
+true : Bool
+> false
+false : Bool
+> (and true true)
+true : Bool
+> (or true false)
+true : Bool
+> (xor true true)
+false : Bool
+> (not true)
+false : Bool
+```
+
+
+**Integer comparisons**
+
+To generate booleans from integers, some basic and quite
+self-explanatory operators are supplied.
+```console
+> (> 2 1)
+true : Bool
+> (< 1 2)
+true : Bool
+> (>= 1 1)
+true : Bool
+> (<= 1 1)
+true : Bool
+> (= 1 1)
+true : Bool
+> (!= 1 1)
+false : Bool
+```
+
+
**Lists**
Lists in myslip correspond to what is known as tuples in many