diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-23 08:48:47 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-23 08:48:47 -0700 |
commit | 115b8bc97f8d0d2ec8ed3cde46d8b567ea437e81 (patch) | |
tree | 9407d82dff6576d85082ad0095cbe18b6c1ca68c | |
parent | 7576bef6c538103b4cb1cd1c343681dd25b09e1f (diff) | |
download | txr-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.1 | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -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 +) |