summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-01-25 12:36:28 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-01-25 12:36:28 -0800
commite593dc1264979d99f1bad53d0496ae6f90c5e2cc (patch)
tree7d54f588fc00c35479af1f8a6459b1e0bd43c103 /txr.1
parentc485146a246ab4b69e6ec510ec47713897f4d463 (diff)
downloadtxr-e593dc1264979d99f1bad53d0496ae6f90c5e2cc.tar.gz
txr-e593dc1264979d99f1bad53d0496ae6f90c5e2cc.tar.bz2
txr-e593dc1264979d99f1bad53d0496ae6f90c5e2cc.zip
Local macrolets in build become functions.
* share/txr/stdlib/build.tl (sys:list-builder-macrolets): Function renamed to sys:list-builder-flets. Builds local functions instead of macrolets. (build): Follow rename of sys:list-builder-macrolets. * txr.1: Documentation updated and example added of use of add as a higher order function.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.17
1 files changed, 6 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index d21cdbd3..6bd6bb94 100644
--- a/txr.1
+++ b/txr.1
@@ -27203,7 +27203,7 @@ Instead,
creates a lexical environment in which a
.code list-builder
object is implicitly constructed and bound to a hidden variable.
-Local macros which mimic the
+Local functions which mimic the
.code list-builder
methods operate implicitly on this hidden variable, so that
the object need not be mentioned as an argument.
@@ -27225,6 +27225,11 @@ the object need not be mentioned as an argument.
(add 1 2)
(pend (get))
(pend (get))) -> (1 2 1 2 1 2 1 2)
+
+ ;; build a list by mapping over the local
+ ;; add function:
+
+ (build [mapdo add (range 1 3)]) -> (1 2 3)
.cble
.SS* Permutations and Combinations