[gambit-list] Problem using 'if' in a macro to conditionaly define a let form
Eric Merritt
cyberlync at gmail.com
Tue Mar 29 20:05:32 EST 2005
Guys,
I am having a bit of a problem with if in a macro and I could use
some help. Say I have a macro similar to the following
(define-macro (foo somestuff)
`(let ((x ,sumstuff)
,(if (is-cool sumstuff)
`(do-something-else-cool)))
(some-more-stuff)))
this will result in an ill formed let anytime 'some-stuff' isn't
cool. Thats becuase the 'if' statement returns #!void in the expansion
which is invalid. Cond does the same thing. Is there an alternate way
to do this, am I missing something obvious? I get the feeling that I
am.
Thanks,
Eric
More information about the Gambit-list
mailing list