diff options
Diffstat (limited to 'README.adoc')
| -rw-r--r-- | README.adoc | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/README.adoc b/README.adoc index c31b576..12a397c 100644 --- a/README.adoc +++ b/README.adoc @@ -52,8 +52,8 @@ For a slightly more realistic example have a look at 'greet.ell'.  Runtime  -------  Variables use per-block dynamic scoping.  Arguments to a block (which is a list -of lists) must be assigned to variables first using the `arg` special form, and -that must happen before they get overriden by execution of a different block. +of lists) are assigned to local variables named `1`, `2`, etc., and the full +list of them is stored in `*`.  When evaluating a command, the first argument is typically a string with its  name and it is resolved as if `set` was called on it. @@ -64,19 +64,18 @@ Special Forms  -------------  `quote [<arg>]...` -Returns the arguments without any evaluation. - -`arg [<name>]...` - -Assigns arguments to the current block in order to given names.  Names for which -there are no values left default to `[]`.  This form can effectively be used to -declare local variables. +Like `values` but returns the arguments without any evaluation.  Standard library  ----------------  The standard library interprets the empty list and the empty string as false  values, everything else is taken as true. +`local <names> [<value>]...` + +Create local variables in the current block.  Names for which there are no +values left default to `()`. +  `set <name> [<value>]`  Retrieve or set a named variable.  The syntax sugar for retrieval is `@`. @@ -167,6 +166,7 @@ Install development packages for GNU Readline to get a REPL for toying around:  Possible Ways of Complicating  ----------------------------- + * `local [_a _b _rest] @*` would elegantly solve the problem of varargs   * reference counting: currently all values are always copied as needed, which     is good enough for all imaginable use cases, simpler and less error-prone  | 
