From 115b8bc97f8d0d2ec8ed3cde46d8b567ea437e81 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 23 Aug 2015 08:48:47 -0700 Subject: 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. --- txr.1 | 29 ++++++++++++++++++++--------- 1 file 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 +) -- cgit v1.2.3