From 2369dbeac7d6a3a33b83dfa48ba26a8b3a601d49 Mon Sep 17 00:00:00 2001 From: Pekka Laiho Date: Sat, 5 Dec 2020 18:09:26 +0700 Subject: [PATCH] improve readme more --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2d11e69..4b9f7dd 100644 --- a/README.md +++ b/README.md @@ -143,13 +143,15 @@ Use the `quasiquote` special form when you need to turn on evaluation temporaril You can use the single-quote (`'`), backtick and tilde (`~`) characters as shortcuts for `quote`, `quasiquote` and `unquote` respectively: ``` -> '(1 2 3) -(1 2 3) +> '(a b c) +(a b c) -> `(5 ~(+ 2 4) 7) -(5 6 7) +> `(a ~(+ 1 2) c) +(a 3 c) ``` +All special forms related to quoting require exactly one argument. + ## Environments Environments are hash-maps which store key-value pairs and use symbols as keys. Symbols are evaluated by looking up the corresponding value from the current environment. If the key is not defined in current environment the lookup proceeds to the parent environment and so forth. The initial environment is called `root` and contains all the built-in functions listed here. Then another environment called `user` is created for anything the user wants to define. The `let` and `fn` special forms create new local environments. Note that `def` always uses the current environment, so anything defined with `def` is not visible in the parent environment.