Problem using 'if' in a macro to conditionaly define a let form
30 Mar
2005
30 Mar
'05
01:05
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
Afficher les réponses par date
7744
Âge (en jours)
7744
Dernière activité (en jours)
0 commentaires
1 participants
participants (1)
-
Eric Merritt