diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-14 06:41:43 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-14 06:41:43 -0700 |
commit | 936463735640b904a97bad5588a12f9d70e88075 (patch) | |
tree | 3825fa31e580069fbabe2f8091e1339f040fb705 /txr.1 | |
parent | 5e79435c47c6d25310be92b412abed8670e5a8ff (diff) | |
download | txr-936463735640b904a97bad5588a12f9d70e88075.tar.gz txr-936463735640b904a97bad5588a12f9d70e88075.tar.bz2 txr-936463735640b904a97bad5588a12f9d70e88075.zip |
doc: improve lset documentation.
* txr.1: Add missing lset to summary of place-mutating
macros. lset actually needs a sequence, not specifically
a list: (lset a b c "123") works, and assigns characters.
It is now documented accordingly.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -11369,6 +11369,11 @@ goes to the rightmost place, and that value is returned. Deletes a place which supports deletion, and returns the value which existed in that place prior to deletion. +.meIP (lset <> { place }+ << list-expr ) +Sets multiple places to values obtained from successive +elements of +.metn sequence . + .PP .SS* Namespaces and Environments @@ -26508,33 +26513,36 @@ that value. If the entry is identified by a key, that key is also removed. .coNP Macro @ lset .synb -.mets (lset <> { place }+ << list-expr ) +.mets (lset <> { place }+ << sequence-expr ) .syne .desc The .code lset operator's parameter list consists of one or more places followed by an expression -.metn list-expr . +.metn sequence-expr . The macro evaluates -.codn list-expr , -which is expected to produce a proper list. +.codn sequence-expr , +which is expected to produce a sequence. Successive elements of the resulting list are then assigned to each successive .codn place . -If there are fewer elements in the list than places, the +If there are fewer elements in the sequence than places, the unmatched places receive the value .codn nil . -Excess elements in the list are ignored. +Excess elements in the sequence are ignored. + +An error exception occurs if the sequence is an improper list with fewer +elements than places. A .code lset form produces the value of -.meta list-expr +.meta sequence-expr as its result value. .SS* User-Defined Places and Place Operators |