소스 검색

Fix log-form and log-form-with-value macros.

Dan Kee 11 년 전
부모
커밋
18800309fb
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      koans/macros.lsp

+ 5 - 5
koans/macros.lsp

@@ -108,10 +108,10 @@
108 108
 
109 109
 (defvar *log* nil)
110 110
 
111
-(defmacro log-form (&body body)
111
+(defmacro log-form (form)
112 112
   "records the body form to the list *log* and then evalues the body normally"
113
-  `(let ((retval ,@body))
114
-     (push ',@body *log*)
113
+  `(let ((retval ,form))
114
+     (push ',form *log*)
115 115
      retval))
116 116
 
117 117
 (define-test test-basic-log-form
@@ -135,11 +135,11 @@
135 135
 (defvar *log-with-value* nil)
136 136
 
137 137
 ;; you must write this macro
138
-(defmacro log-form-with-value (&body body)
138
+(defmacro log-form-with-value (form)
139 139
   "records the body form, and the form's return value
140 140
    to the list *log-with-value* and then evalues the body normally"
141 141
   `(let ((logform nil)
142
-         (retval ,@body))
142
+         (retval ,form))
143 143
 
144 144
      ;; YOUR MACRO COMPLETION CODE GOES HERE.
145 145