hi all,
I'm sorry about by english but I'm searching a small sort-function to sort
such list-entries:
a List consits of 3-value-lists:
((1 1 3) (2 1 3) (1 2 3) (3 1 3) (1 3 3) (3 2 3) (3 3 3) (4 1 3) (1 4 3)))
output when sorted by the first value:
((1 1 3) (1 2 3) (1 3 3) (1 4 3) (2 1 3) (3 1 3) (3 2 3) (3 3 3) (4 1 3))
-> sortet by eg. the first (second etc.) value from the list in the list.
"Martin Haslinger" <···@ferroglas.co.at> writes:
> hi all,
>
> I'm sorry about by english but I'm searching a small sort-function to sort
> such list-entries:
look at
http://www.xanalys.com/software_tools/reference/HyperSpec/Body/fun_finish-ou_clear-output.html
-wb
In article <·············@wrath.news.nacamar.de>,
Martin Haslinger <···@ferroglas.co.at> wrote:
>hi all,
>
>I'm sorry about by english but I'm searching a small sort-function to sort
>such list-entries:
>a List consits of 3-value-lists:
>((1 1 3) (2 1 3) (1 2 3) (3 1 3) (1 3 3) (3 2 3) (3 3 3) (4 1 3) (1 4 3)))
>
>output when sorted by the first value:
>((1 1 3) (1 2 3) (1 3 3) (1 4 3) (2 1 3) (3 1 3) (3 2 3) (3 3 3) (4 1 3))
>
>-> sortet by eg. the first (second etc.) value from the list in the list.
What's wrong with Common Lisp's built-in SORT function? You supply a
function that compares two elements, and it then sorts the list using that
function.
--
Barry Margolin, ······@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.