From a895a81fc9b6425a9d4b39806aac4da6edbd233e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 20 Dec 2016 10:44:58 -0800 Subject: doc: move with-gensyms section. * txr.1: with-gensyms moves from User-Defined Places to macros. --- txr.1 | 65 ++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 32 insertions(+), 33 deletions(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 3409fc91..4ae879cd 100644 --- a/txr.1 +++ b/txr.1 @@ -28362,6 +28362,38 @@ should be understood to be a globally unique symbol: clause1 clause2 ...)) .cble +.coNP Macro @ with-gensyms +.synb +.mets (with-gensyms <> ( sym *) << body-form *) +.syne +.desc +The +.code with-gensyms +evaluates the +.metn body-form -s +in an environment in which each variable name symbol +.meta sym +is bound to a new uninterned symbol ("gensym"). + +.TP* "Example:" + +The code: + +.cblk + (let ((x (gensym)) + (y (gensym)) + (z (gensym))) + ^(,x ,y ,z)) +.cble + +may be expressed more conveniently using the +.code with-gensyms +shorthand: + +.cblk + (with-gensyms (x y z) + ^(,x ,y ,z)) +.cble .SS* Mutation of Syntactic Places .coNP Macro @ set @@ -30368,39 +30400,6 @@ treat the situation in a satisfactory way using a definition, which effectively then supplies inline code whenever a certain form is used as a place, and that code itself is treated as a place. -.coNP Macro @ with-gensyms -.synb -.mets (with-gensyms <> ( sym *) << body-form *) -.syne -.desc -The -.code with-gensyms -evaluates the -.metn body-form -s -in an environment in which each variable name symbol -.meta sym -is bound to a new uninterned symbol ("gensym"). - -.TP* "Example:" - -The code: - -.cblk - (let ((x (gensym)) - (y (gensym)) - (z (gensym))) - ^(,x ,y ,z)) -.cble - -may be expressed more conveniently using the -.code with-gensyms -shorthand: - -.cblk - (with-gensyms (x y z) - ^(,x ,y ,z)) -.cble - .SS* Quasiquote Operator Syntax .coNP Macro @ qquote .synb -- cgit v1.2.3