playing with this...
(%i5) infix("->",30,30)$
(%i6) "->"(x,f) := (if not listp(x) then x : [x], buildq([x,f], lambda(x,
f)))$
Opps:
(%i7) f : [[x]]-> lmax(x);
Function lmax expects a list or a set, instead found x
Redact:
(%i8) "->"(x,f) ::= (if not listp(x) then x : [x], buildq([x,f], lambda(x,
f)))$
(%i9) f : [[x]] -> lmax(x);
(%o9) lambda([[x]],lmax(x))
(%i10) f(4,5,42);
(%o10) 42
Barton
-----macrakis at gmail.com wrote: -----
>Or?maybe?"->"(x,f)?:=?buildq([x,f],?lambda(x,?f))$?so?that?you?can?define
>functions?with?multiple?arguments?
>
>But?then?a->a?becomes?an?error.?But?special-casing?a->a?as?equivalent?to
>[a]->a?complicates?things....
>
>
>Syntactic?design,?though?one?of?the?more?trivial?parts?of?language?design,
>is?full?of?messes?like?this....
>
>????????????????-s