#|
So much happening  ...  Please tune into aNONradio tomorrow!  Synthetic wumpuses
will be hunted. I think. I've got an idea.

But for now while bone tired, I was thinking about knocking it up a level. Truth
be told (as usual) ldbeth mentioned using a two-quasiquote macro. It's something
I never really grokked.

Here's a try.
|#

(defmacro lamdef ((nth) &body body) "
(lamdef (nth) ..forms..)
a list of
(0) : CARs of the forms
or
(1) : Quoted forms
or
(2) : evaluated forms
"
`(format t "~@{~a~%~}"
,@(mapcar
(lambda (lambda)
`(nth-value ,nth
(let ((lambda ',lambda))
(apply 'values `(,(car lambda)
,lambda
,,lambda)))))
body)))


#|

Well  macros   can  be confusing.   I think  if I used the nth  parameter   more
vigorously something interesting would be happening. I've just shadowed the name
lambda and used commas to access the name at different levels.

> (lamdef (0) (lambda () '5) (list 1 2))

(LAMBDA LIST)
> (lamdef (2) (lambda () '5) (list 1 2))

(#<bytecompiled-closure #<bytecompiled-function 0xxxx>> (1 2))
> (lamdef (1) (lambda () '5) (list 1 2))
|#