inconsistent definition of "sort" (and what about stability?)
Subject: inconsistent definition of "sort" (and what about stability?)
From: Oliver Kullmann
Date: Sun, 13 Nov 2011 09:35:27 +0000
> (4) Use cl:stable-sort. (Perhaps that's what (1) is saying.)
>
Reading
37.1 Lisp and Maxima
Maxima is written in Lisp, and it is easy to access Lisp functions and variables from Maxima and vice versa.
my closest guess is stably sort [1,3,2] is
:lisp (stable-sort #$[1,3,2]$ #$orderlessp$);
Maxima encountered a Lisp error:
The value MLIST is not of type LIST.
In
5.4.1 Introduction to Lists
Lists are the basic building block for Maxima and Lisp. All data types other than arrays, hash tables, numbers are represented as Lisp lists, These Lisp lists have the form
it says
Internally this corresponds to a Lisp list of the form
((MLIST) 1 2 7 ((MPLUS) $X $Y ))
however it is not said what "corresponds" means. Guessing from
the above there are two types MLIST and LIST, where apparently
"MLIST" stands for Maxima-list. So the "corresponds" would be
"is", but then "a Lisp list", namely an MLIST, appears not
to be Lisp list, namely a LIST?
It seems the Maxima-documentation doesn't speak about the conversion?
Best
Oliver