Converting an mlist to a list?



Thanks! I gave it a shot, but I seem to be tripping up on something
here:

(%i1) unitgreat(list1) := apply('ordergreat,[?cdr(list1)]);
(%o1)        unitgreat(list1) := apply('ordergreat, [cdr(list1)])
(%i2) a1 : [s,m,kg];
(%o2)                             [s, m, kg]
(%i3) unitgreat(a1);

Maxima encountered a Lisp error:

 The value $S is not of type LIST.

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i4) unorder();

Maxima encountered a Lisp error:

 The value ($S $M $KG) is not of type SYMBOL.

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

What I'm trying to do is the following, but using a list as an
argument:

(%i2) ordergreat(s,m,kg);
(%o2)                                done
(%i3) a*kg*m/s^2*z;
                                   a z kg m
(%o3)                              --------
                                       2
                                      s

CY

--- Barton Willis  wrote:
> 
> The CL function 'cdr' will convert a Maxima
> list to a CL list.  Maxima can print a
> CL list, but maxima cannot evaluate a CL list:
> 
> (%i13) :lisp(list 1 2 3);
> (1 2 3)
> (%i13) ?cdr([1,2,3]);
> 
> Maxima encountered a Lisp error: ...
> 
> Barton
> 
> -----maxima-admin@math.utexas.edu wrote: -----
> 
> >To: Maxima list
> >From: C Y
> >Sent by: maxima-admin@math.utexas.edu
> >Date: 05/03/2005 06:22AM
> >Subject: Converting an mlist to a list?
> >
> >Hi all.  I've got another nuts and bolts
> >question:
> >
> >I would like to take an input of a list defined
> >at the Maxima level,
> >and convert it into a pure lisp list.  Is there
> >any way in the system
> >to do this right now?
> >
> >Thanks,
> >CY
> >
> >_________________________________________________
> >_
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> >protection around
> >http://mail.yahoo.com
> >
> >_______________________________________________
> >Maxima mailing list
> >Maxima@www.math.utexas.edu
> >http://www.math.utexas.edu/mailman/listinfo/maxim
> >a
> >
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com