aboutsummaryrefslogtreecommitdiff
path: root/TUTORIAL.md
diff options
context:
space:
mode:
Diffstat (limited to 'TUTORIAL.md')
-rw-r--r--TUTORIAL.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/TUTORIAL.md b/TUTORIAL.md
index 4cf8948..c8eaab2 100644
--- a/TUTORIAL.md
+++ b/TUTORIAL.md
@@ -191,8 +191,6 @@ The elements of a list can of course be of different types:
(quote - 0 (quote 1 2)) : (Quote ((Int Int) -> Int) Int (Quote (Int Int)))
```
-TODO: List destructuring
-
Vectors
-------
@@ -207,7 +205,15 @@ vector : ((T ...) -> (Vector (T ...)))
(vector 1 2 3 4) : (Vector (Int ...))
```
-TODO: vector destructuring
+An empty vector is created by passing its type to nil:
+```console
+> (() Int)
+vector : (Int ...)
+```
+
+The standard library provides the function `sum` to
+calculate the sum of a vector of integers. Through
+type conversions, this works for lists too.
Pattern matching