1. Someone proposed that
op(f) where f is an atom should return f.
This means that
op(f(a,b,c)) and op(f) both return f, which is potentially
confusing.
2. Implementing a case and typecase statements (as in commercial macsyma
and
in common lisp) might be more useful in producing readable programs.
typecase(x,
[mapatom? ......]
[otherwise , case (inop(x),
["+" ....]
[[sin,cos,tan], ...
etc.
RJF
PS. I can find buildq code for case.
----- Original Message -----
From: "Andrey G. Grozin" <A.G.Grozin at inp.nsk.su>
To: "Robert Dodier" <robert.dodier at gmail.com>
Cc: "maxima" <maxima at math.utexas.edu>
Sent: Sunday, May 07, 2006 7:13 PM
Subject: Re: [Maxima] proposal to modify op and args
> On Sun, 7 May 2006, Robert Dodier wrote:
>> At present the functions op and args barf on atoms.
>> I propose that op and args return false when the argument is an atom.
> If an argument in an expression is exactly
> false
> then it will be impossible to distinguish this case from the case of an
> atom. I don't think this is good.
> An atom has no args, so, it *is* an error to try to get them.
>
> Andrey
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>