"Bill Page" <[EMAIL PROTECTED]> writes:

> >  But I can play tricks like this:
> >
> >  foo(x)==
> >         L:=[x.1-x.1]
> >         L:= append(L,x)
> >         return L
> >

> Although you might still consider it a "trick" I would suggest the
> following code that I think is more transparent:
> 
>   foo(x)==
>          L:=select(a+->false,x)
>          L:= append(L,x)

Angelos' trick is better: select would have to consider every element of x...

But maybe you like

   foo(x)==
          L:= if empty? x then x else rest [first x]
          L:= append(L,x)

The best way to go forward is of course to make type inference better.  (And I
do believe that it's already quite OK, contrary to Bill)

Martin



_______________________________________________
Axiom-mail mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-mail

Reply via email to