summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-04-21 03:36:43 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-04-21 03:36:43 -0700
commiteffd37e7ed64dd0300b37af1a102febea84c9504 (patch)
tree84b70cf4e842b13a1244d6420f111e085d78c122 /txr.1
parent6c6d60171a53742ae856a59f063a229e990141b6 (diff)
downloadtxr-effd37e7ed64dd0300b37af1a102febea84c9504.tar.gz
txr-effd37e7ed64dd0300b37af1a102febea84c9504.tar.bz2
txr-effd37e7ed64dd0300b37af1a102febea84c9504.zip
New function: window-mapdo.
* lib.c (enum wmap_op): New enum type. (window_map_list): Use enum wmap_op for last argument instead of Boolean flag. If the argument is WMAP_MAPDO, do not accumulate. (window_map_vec, window_map, window_mapped): Adjust to new enum argument. (window_mapdo): New function. * lib.h (window_mapdo): Declared. * eval.c (eval_init): window-mapdo intrinsic registered. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.110
1 files changed, 9 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index a4a98179..640c1e16 100644
--- a/txr.1
+++ b/txr.1
@@ -29488,10 +29488,11 @@ on a list of the arguments. The following equivalences hold:
(zip '(a b c) '(c d e)) -> ((a c) (b d) (c e))
.brev
-.coNP Functions @ window-map and @ window-mappend
+.coNP Functions @, window-map @ window-mappend and @ window-mapdo
.synb
.mets (window-map < range < boundary < function << sequence )
.mets (window-mappend < range < boundary < function << sequence )
+.mets (window-mapdo < range < boundary < function << sequence )
.syne
.desc
The
@@ -29528,6 +29529,13 @@ they perform a
.IR "sliding window mapping" ,
whose description follows.
+The function
+.code window-mappend
+avoids accumulating a sequence, and instead returns
+.codn nil ;
+it is analogous to
+.codn mapdo .
+
The argument to the
.meta range
parameter must be a positive integer, not exceeding 512.