functional programming in Maxima



In the second version, the assignment to y isn't needed, I think:

  F:lambda([y],buildq([y],lambda([x],x^2+y)));

Barton

-----maxima-bounces at math.utexas.edu wrote: -----


>I?tried
>F:lambda([y],lambda([x],x^2+y));
>
>F(3)(4)
>
>expecting?to?get?4^2+3?or?19.
>
>Instead?I?got?y+16.
>
>Is?this?expected?
>
>F:lambda([y],buildq([y:y],lambda([x],x^2+y)))
>
>?works?to?give?19...
>
>RJF
>_______________________________________________
>Maxima?mailing?list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima