PDA

View Full Version : A recurring error


SolarBear
07-25-2004, 11:29 PM
Hi.

Slowly (VERY slowly, in fact) continuing my trip in the world of Lisp, I've got that error more than once when defining functions :
(PUSH (CAR LST2) LST1) should be a lambda expression

What does that mean, exactly ? If I define lst1 and lst2 first and try (push (car lst2) lst1), I get the correct output. I know what's a lambda expression but I don't see why it applies here.

jemfinch
07-27-2004, 07:55 PM
It's just an odd error due to the macro expansion of push -- remember, push isn't a function, but a macro.

Jeremy

stuka
07-28-2004, 12:37 AM
Heh - interesting to note that C isn't the only language where macro expansion can bite you on the butt ;) </snide_remark>

SolarBear
07-28-2004, 09:18 AM
Originally posted by jemfinch
It's just an odd error due to the macro expansion of push -- remember, push isn't a function, but a macro.

Jeremy

Ah ok, thanks a lot. I'm still struggling with functions vs. macros, when to use one instead of the other, etc. But I'll get it sorted. :thumb: