summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Cerqueira <dan.git@lispclub.com>2025-05-30 22:38:48 +0100
committerDaniel Cerqueira <dan.git@lispclub.com>2025-05-30 22:38:48 +0100
commitd490f286483d40adbfeaa4f03eff8ab625b5710c (patch)
tree8c05fcd91fecdb2c039015273c6eff3d8ba91d00
parent6151706fb563c0fa4c82e24193e8ec9d170d04e8 (diff)
update README.md
-rw-r--r--README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md
index 18c6108..bfaad4c 100644
--- a/README.md
+++ b/README.md
@@ -90,6 +90,23 @@ do something at the beginning, because other cons cells should never have `()` i
(say (a b c)) ; (() a b c)
\(a b c) ; (() a b c)
+`(split x)` takes a symbol, a number, or a string, returns a list with `x`
+splitted by each character:
+
+ (split 'cons) ; (c o n s)
+ (split +123) ; (+ 1 2 3)
+ (split "meeow") ; ("m" "e" "e" "o" "w")
+ (split '(what error)) ; gives an error
+ (split cons) ; gives an error
+
+`(join x)` takes a list, returns an symbol from joining each list atom. List atoms
+cannot be of different type:
+
+ (join '(a bc d)) ; abcd
+ (join '(+0 +1)) ; +0+1
+ (join '("a " "string")) ; "a string"
+ (join '("what" error)) ; error: cannot join list atoms of different type
+
### List operations
`(list ...)` returns a list containing the supplied arguments: