I was not aware of the existance of FREEOFL,
and I apologize to the list for that oversight.
When I first looked at freeof, I thought it could benefit
from changing it so that it would not convert to general form.
I then started to look at the rat*.lisp packages, and saw that
there was so little code documentation, that I was afraid that
whatever I wrote for for nfreeof, would be reinventing the
wheel, so I decided to wait on it. I also looked at the
definition for totaldisrep, and saw it first checks if its input
is a atom and in that case just returns.
Also I noticed that functions which take a list, instead of
one argument, usually start with L.
So I then posted to the list, which you quote,
that I changed my mind, and was going to call the
new function LFREEOF. That would have been a
good time to point out the existance of FREEOFL.
I then wrote LFREEOF, so that it checked for
incorrect usage, made a minor optimization
which was to only do totaldisrep on one element
of the list at a time, added a entry in the texi file,
and added some tests to the rtest file which checked
freeof.
I am willing to either change the name of the function
to FREEOFL or modify existing usage of FREEOFL to LFREEOF.
Since I needed the functionality of LFREEOF for charsets,
I think it needs to go in one of the files in the src directory.
After the rat*lisp files are better documented,
I will go back to LFREEOF and modify it then.
Does this sound reasonable?
Dan Stanger
Wolfgang Jenkner wrote:
> Dan Stanger <dan.stanger@ieee.org> writes:
>
> > In conforming to maxima/macsyma naming conventions,
> > I have decided to call the new freeof function
> > LFREEOF
> > with the usage LFREEOF(list, expression).
> > It is consistant with the name and usage of LRATSUBST.
>
> Your function has been part of Maxima since the beginning under the
> name $FREEOFL (its definition was not extant, though) and it is used
> in facexp.mac and some other files. You may find it in its new old
> home genut.mac.
>
> I am somewhat puzzled, though, since the discussion on the mailing
> list gave me the impression that your foremost concern was to avoid
> conversion to general representation form. What you committed (to
> nrat4.lisp) doesn't show this concern anymore and your implementation
> seems to have the same degree of efficiency as what is already in
> genut.mac (by the way, I might replace my definition there by
>
> freeofl(varl,exp):=apply('freeof,endcons(exp,varl))$
>
> or some such thing). Why do you think it's a good idea to add such a
> function to the lisp core of Maxima?
>
> Wolfgang
> --
> wjenkner@inode.at
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima