Hans Peter, On November 7, 2005 1:28 AM you wrote: > > Thank you for the quick answer. I had hoped for a different > one. S-expressions are what I would call a parse tree, but > I feel that I have to leave thinking in Axiom and need > rethinking in Lisp. Anyway, I will try.
I know what you mean, but I don't think that it is necessary to "rethink in Lisp" as such. Structures like InputForm are certainly Axiom domains in their own right. For example you can write: A:=sin(2*x)::InputForm A.2.1 to get the "*". The InputForm domain includes a large number of operations: )show InputForm including one called 'interpret' that evaluates the InputForm as an actual input. > > I understand if you write that inMult does exactly what it > should, but somehow I would like to program without always > having to have the precise documentation at hand (which in > this case would have to be the source code, as in the > HyperText documentation no type requirements are given, i.e. > that "n in R"). Of course HyperDoc and the Axiom book need to be updated to include information about these functions. > > Just one example to explain, why I felt there was some > inconsistency: > > if isPower(x**y) returns [x**y,1] then I would expect > isMult(x*y) to return [x*y,1] as the power expression > seems to be viewed as (x**y)**1, so one would > expect the second expression to be viewed as (x*y)*1. > I agree with you that it is a little inconsistent. What do you think would be better: 1) for isPower(x**y) to return "failed" or 2) for isMult(x*y) to return 1? If we check carefully how these are used in the Axiom library code and the Axiom test input files now, then I expect that it would be quite easy to make these operations consistent. Regards, Bill Page. _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer