Lists and such (Was Re: [Maxima] Lisp)



It would be possible to add almost any of the lisp
commands to macsyma.  The basic notion of a macsyma
lisp  [a,b,c]
is internally  ((mlist simp) $a $b $c)

so you might convert that to a lisp
list  ($a $b $c), operate on it,  and then if
the result is a list, cons back the (mlist simp)
header.

This is tricky because if the result isn't a list of
expressions, but something like  ((mplus simp) $a $b $c)
then putting (mlist simp) on the front is not a good
idea.

RJF

Jürgen Tischer wrote:
> 
> On Wednesday 24 October 2001 17:02, C Y wrote:
> > --- "Vadim V. Zhytnikov" <vvzhy@mail.ru> wrote:
> > > > And if we had a maxima tied to a standard (is that common lisp),
> > > > how about letting maxima use all the goodies cl comes with? I
> > > > read (as good as I can) Common Lisp the Language and it was
> > > > like reading a recipe of Mathematica commands for manipulating
> > > > lists and all that (which I'm badly missing). If I'm right,
> >
> > couldn't
> >
> > > > one have all that stuff in maxima too?
> > >
> > > Frankly I do not quite understand what do you mean.
> >
> > I think he wants to add in Lisp's native ability to handle lists into
> > Maxima.  Maybe J?rgen you could provide some specific examples of
> > what you'd like to be able to do?  I suppose set operations and the
> > like might be part of that, but I confess I'm not clear as to what you
> > have in mind either.
> >
> 
> Of course set operations are part of it, but there is much more. All those
> functions to find, delete, replace elements in a sequence, Take a subseq,
> Fold with reduce, count the number of elements, Partition a sequence with
> overlapping and so on.
> I'm aware that I can call lisp functions from maxima, and I think that's
> nice. But I would prefer it maxima style.
> 
> Jürgen
> 
> 
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima