summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-05-18 20:34:43 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-05-18 20:34:43 +0200
commita40b7da1ab4028bba53f9768b7a58a7c619a052d (patch)
treeae81e2bb556957ec5891f2c0d3ead8d60147af3f /README.md
parent9e1d65b41b0f5435859794682880c93767d1dc44 (diff)
Concatenation operator for listsHEADmaster
Changelog: Added `++` operator to concatenate lists
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8d40a6f..62ae1a0 100644
--- a/README.md
+++ b/README.md
@@ -236,7 +236,11 @@ let numbers = [1, 2, 4]
List elements can be of any type, but all elements of a particular list must have the same type.
They can be concatenated using the `concat` function, which takes a list of lists as argument:
```
-let list = concat [[1], [2, 3], [4]] # = [1, 2, 3, 4,]
+let list = concat [[1], [2, 3], [4]] # = [1, 2, 3, 4]
+```
+Or with the `++` operator:
+```
+let list = [1] ++ [2, 3] ++ [4] # = [1, 2, 3, 4]
```
### Built-in commands