[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macros and anonymous functions



Bruce Lewis wrote:
> 
> Paul Prescod <paul@prescod.net> writes:
> 
> > #my-macro(plot, x*2+3)
> >
> > Python could pass the latter expression to the macro as an anonymous
> > function even though the user never typed "lambda".
> 
> The person who uses my-macro needn't type lambda, but the person who
> writes my-macro needs to type lambda.  Otherwise how is it that "x" is a
> free variable and "plot" is not?

I would presume that there is syntax available in the macro definition
that is not available in the main language. e.g. syntax-rules in Scheme.
Maybe that syntax is lambda, maybe it isn't. 

 Paul Prescod