syntax question about user defined infix



infix("-->",50,50)$ work correctly it seems. but i don't know what is
the best value.

2007/1/24, Barton Willis <willisb at unk.edu>:
>
> Mostly for fun I tried:
>
> (%i1) infix("-->",10,10)$
> (%i2) "-->"(x,e) := buildq([x,e], lambda([x],e))$
>
> It seems to work:
>
> (%i3) x --> 5 - x^7;
> (%o3) lambda([x],5-x^7)
>
> I have a function 'bisection' that takes as its first
> argument a function. Does my infix --> work now? No:
>
> (%i4) bisection(x --> 5 - x^7, 0, 2, 1/10);
> Incorrect syntax: Missing )
> bisection(x -->
>              ^
> But bisection("-->"(x, 5 - x^7), 0, 2, 1/10) is OK:
>
> (%i8) bisection("-->"(x, 5 - x^7), 0, 2, 1/10);
> (%o8) interval(5/4,21/16)
>
> Does this have something to do with 'bisection'? Apparently, no:
>
> (%i4) f( x --> 5 - x^7);
> Incorrect syntax: Missing )
> f( x -->
>       ^
>
> I've tried other binding powers and other names for "-->",
> but nothing I tried works.
>
> My Macsyma (an elderly 2.2) does the same thing. I tried
> this infix scheme for a lambda form partly because students think
> the lambda from is weird and verbose. And they love arrows ....
>
> Barton
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>