ev(x) where x is a symbol seems to be OK. I'd be more comfortable if we
had a simple eval function that did only that, though. Of course, any time
you use an eval function you have to be careful about things like scope.
-s
On Fri, Dec 23, 2011 at 11:06, Raymond Toy <toy.raymond at gmail.com> wrote:
> On 12/23/11 7:07 AM, Stavros Macrakis wrote:
>
> 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
>
> Is this one of the cases where ev is the right thing to use?
>
> Ray
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>