summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-23 08:48:47 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-23 08:48:47 -0700
commit115b8bc97f8d0d2ec8ed3cde46d8b567ea437e81 (patch)
tree9407d82dff6576d85082ad0095cbe18b6c1ca68c
parent7576bef6c538103b4cb1cd1c343681dd25b09e1f (diff)
downloadtxr-115b8bc97f8d0d2ec8ed3cde46d8b567ea437e81.tar.gz
txr-115b8bc97f8d0d2ec8ed3cde46d8b567ea437e81.tar.bz2
txr-115b8bc97f8d0d2ec8ed3cde46d8b567ea437e81.zip
Clarification about @rest in do/op syntax.
* txr.1: Make it clear that @rest is not inserted if meta-numbers or @rest is present. Move example to the end.
-rw-r--r--txr.129
1 files changed, 20 insertions, 9 deletions
diff --git a/txr.1 b/txr.1
index 8db39126..83ef5e2d 100644
--- a/txr.1
+++ b/txr.1
@@ -25912,6 +25912,17 @@ it is actually a shorthand for
.codn (op foo . @rest) :
a function which applies all of its arguments to
.codn foo .
+If the body does contain at least one
+.meta @num
+or
+.metn @rest ,
+then
+.meta @rest
+isn't implicitly inserted. The notation
+.code (op foo @1)
+denotes a function which takes any number of arguments, and ignores
+all but the first one, which is passed to
+.codn foo .
The actions of
.code op
@@ -26034,15 +26045,6 @@ a parameter from the outermost
into the innermost
.codn op .
-.TP* Examples:
-
-.cblk
- ;; Take a list of pairs and produce a list in which those pairs
- ;; are reversed.
-
- (mapcar (op list @2 @1) '((1 2) (a b))) -> ((2 1) (b a))
-.cble
-
The
.code op
syntax interacts with quasiliterals which are nested within it.
@@ -26106,6 +26108,15 @@ from a quasiliteral within a nested
(op ... (op ... `@@@1`))
.cble
+.TP* Example:
+
+.cblk
+ ;; Take a list of pairs and produce a list in which those pairs
+ ;; are reversed.
+
+ (mapcar (op list @2 @1) '((1 2) (a b))) -> ((2 1) (b a))
+.cble
+
.coNP Macros @, ap @, ip @ ado and @ ido.
.synb
.mets (ap << form +)