aboutsummaryrefslogtreecommitdiff
path: root/TUTORIAL.md
diff options
context:
space:
mode:
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