diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-01-19 00:07:09 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-01-19 00:07:09 -0800 |
commit | 53d6e51da8f7697404a9daf2882ee9a29bff60d1 (patch) | |
tree | 823227bd746051c07f076a708c88cdbad45e0116 | |
parent | 040ac1066fae0f2041e4b508174518598639bae2 (diff) | |
download | txr-53d6e51da8f7697404a9daf2882ee9a29bff60d1.tar.gz txr-53d6e51da8f7697404a9daf2882ee9a29bff60d1.tar.bz2 txr-53d6e51da8f7697404a9daf2882ee9a29bff60d1.zip |
doc: fix defmacro example
* txr.1: Fix the bungled dolist macro definition, as well as
the incorrect example illustrating its usage.
-rw-r--r-- | txr.1 | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -35598,12 +35598,12 @@ as the original function call. ;; and return 42. ;; ;; (dolist (x '(1 2 3) 42) - ;; (format t "~s\en")) + ;; (format t "~s\en" x)) (defmacro dolist ((var list : result) . body) - (let ((i (my-gensym))) - ^(for ((i ,list)) (i ,result) ((set i (cdr i))) - (let ((,var (car i))) + (let ((i (gensym))) + ^(for ((,i ,list)) (,i ,result) ((set ,i (cdr ,i))) + (let ((,var (car ,i))) ,*body)))) .brev |