Browse code
Adding prog1-let after when-let and if-let
fiddlerwoaroof authored on 15/08/2016 08:45:23
Showing 2 changed files
Showing 2 changed files
... | ... |
@@ -190,4 +190,9 @@ |
190 | 190 |
"Make setf a bit nicer to use with paredit" |
191 | 191 |
(list* 'setf (apply #'append body))) |
192 | 192 |
|
193 |
+(defmacro prog1-let ((&rest result-binding) &body body) |
|
194 |
+ `(let (,@result-binding) |
|
195 |
+ (prog1 (list ,@(mapcar #'car result-binding)) |
|
196 |
+ ,@body))) |
|
197 |
+ |
|
193 | 198 |
|