create a function



I think that you need to use buildq:

 (%i5) s(o):= buildq([o], lambda([m],2*m-o));
 (%o5) s(o):=buildq([o],lambda([m],2*m-o))

 (%i6) s(5);
 (%o6) lambda([m],2*m-5)

 (%i7) s(5)(x);
 (%o7) 2*x-5

For the user documentation on buildq, enter ? buildq.

--Barton

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

>To:?maxima at math.utexas.edu
>From:?Paul.Lennon at beatles.com
>Sent?by:?maxima-bounces at math.utexas.edu
>Date:?09/27/2010?06:45AM
>Subject:?[Maxima]?create?a?function
>
>
>
>??
>
>????
>??
>????Hi,?
>
>??????
>
>??????????I?try?to?contruct?a?function??real?->?function.
>
>??????
>
>??????????s(o):=lambda([m],2*m-o);
>
>??????
>
>??????where?o?and?m?are?liste?of?two?reals?don't?work.
>
>??????
>
>??????an?idee??
>
>??????
>
>??????Thanks.
>
>??????
>
>??????PL
>
>????
>??_______________________________________________
>Maxima?mailing?list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima