different behaviour of lambda() inside and outside functions
Subject: different behaviour of lambda() inside and outside functions
From: andre maute
Date: Thu, 10 May 2007 11:45:15 +0200
On Thursday 10 May 2007, you wrote:
> On 5/9/07, andre maute <andre.maute at gmx.de> wrote:
> > I'm relatively new to Maxima,
> > but is it intended behaviour that lambda behaves differently
> > if it is called within a function?
> >
> > I have attached my little test script and
> > a .txt file containing the output
> >
> > scaled_u and the last h are different
>
> As pointed out by Stavros, the '' operator causes a substitution
> when the function body is parsed, not at run time.
> I find that replacing the assignment to f in myScaled
> with
>
> f : buildq ([v, h], lambda (v, h))
o.k. that works,
1. could you please add a similar example to the documentation
2. what does the "q" in buildq stand for literally?
>
> does yield scaled_u the same as the final h.
>
> buildq is a parallel substitution function which does not evaluate
> the expression to be substituted into.
>
> HTH
> Robert Dodier
Thank you very much and kind regards
Andre