diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-14 06:48:35 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-14 06:48:35 -0700 |
commit | 61617da8db174532055801a7ccdc244b8fb80f2e (patch) | |
tree | d2c861b1ce6f5dc35f241451a89068f4fc6cc34d /txr.1 | |
parent | 936463735640b904a97bad5588a12f9d70e88075 (diff) | |
download | txr-61617da8db174532055801a7ccdc244b8fb80f2e.tar.gz txr-61617da8db174532055801a7ccdc244b8fb80f2e.tar.bz2 txr-61617da8db174532055801a7ccdc244b8fb80f2e.zip |
New place-mutating macro: upd.
* lisplib.c (place_set_entries): Add upd to the auto-load
list for place.tl.
* share/txr/stdlib/place.tl (upd): New macro.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -11374,6 +11374,14 @@ Sets multiple places to values obtained from successive elements of .metn sequence . +.meIP (upd < place << opip-arg *) +Applies an +.codn opip -style +operational pipeline to the value of +.meta place +and stores the result back into +.metn place . + .PP .SS* Namespaces and Environments @@ -26545,6 +26553,32 @@ form produces the value of .meta sequence-expr as its result value. +.coNP Macro @ upd +.synb +.mets (upd < place << opip-arg *) +.syne +.desc +The +.code upd +macro evaluates +.meta place +and passes the value as an argument to the operational pipeline +function formed, +as if by the +.code opip +macro, from the +.meta opip-arg +arguments. The result of this function is then stored back into +.metn place . + +The following equivalence holds, except that place +.code p +is evaluated only once: + +.cblk + (upd p x y z ...) <--> (set p (call (opip x y z ...) p)) +.cble + .SS* User-Defined Places and Place Operators \*(TL provides a number of place-modifying operators such as .codn set , |