aboutsummaryrefslogtreecommitdiff
path: root/TUTORIAL.md
diff options
context:
space:
mode:
Diffstat (limited to 'TUTORIAL.md')
-rw-r--r--TUTORIAL.md21
1 files changed, 20 insertions, 1 deletions
diff --git a/TUTORIAL.md b/TUTORIAL.md
index d7bf266..4cf8948 100644
--- a/TUTORIAL.md
+++ b/TUTORIAL.md
@@ -44,6 +44,15 @@ Decimals are truncated in division:
2 : Int
```
+Increment and decrement operators are supplied by the
+standard library:
+```console
+> (-- 1)
+0 : Int
+> (++ 1)
+2 : Int
+```
+
Booleans
--------
@@ -65,6 +74,15 @@ false : Bool
false : Bool
```
+If-expressions are provided by the standard library in the
+form `(if [condition] [iftrue] [iffalse])`:
+```console
+> (if true 1 0)
+1 : Int
+> (if false 1 0)
+0 : Int
+```
+
Integer comparisons
-------------------
@@ -99,7 +117,8 @@ x saved
```
The REPL interprets this as `((let x 1) x)`, which you
could also type but would make a more cumbersome REPLing
-experience.
+experience (and would make loading definitions from files
+nigh impossible).
Shadowing works as expected:
```console