subst(expr,'expr,lambda([i],expr))
buildq([expr],lambda([i],expr))
Both return lambda([i],i).
Examples of use:
expr: '(i^2)$
myfun: subst(expr,'expr,lambda([i],expr))$
myfun(5) => 25
or simply
lambda([i],ev(expr))(5) => 25
-s
On Fri, Dec 23, 2011 at 07:16, Erich Neuwirth
<erich.neuwirth at univie.ac.at>wrote:
> lambda([i],i)(2)
> produces 2
> but
> expr:i
> lambda([i],expr)(2)
> produces i
> Is there an idiom which allows to put an already defined expression into
> lambda?
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>