make_lambda function to construct a lambda expression
Subject: make_lambda function to construct a lambda expression
From: Stavros Macrakis
Date: Fri, 11 May 2007 10:56:51 -0400
On 5/11/07, Robert Dodier <robert.dodier at gmail.com> wrote:
>
> I wonder what anyone thinks of Maxima having a built-in
> function to construct a lambda expression....
> F (a) := make_lambda (['x], 'x * a);
>
Why is this better than funmake( 'lambda,['[x], 'x*a ]) ?
Actually, I prefer funcall('lambda,'[x],'x*a), but funcall is not part of
standard Maxima.
Here is a possible implementation of make_lambda.
> make_lambda (v, expr) := buildq ([v, expr], lambda (v, expr));
>
I think you mean "::=" here -- buildq is specifically designed for use in
macros and quotes its arguments (hence the "q" in its name).
-s