Re: the sort function in lisp (destructive)



På Sun, 06 Jan 2008 17:38:04 +0100, skrev Rainer Joswig <joswig@xxxxxxx>:


Another alternative would be a SORT that does not reorder the CONS cells,
but the CARs of the CONS cells. SORT the list into another
data structure and then set the list's CARs from there.
Though even that would not be that useful.



In fact looking at the source for Corman Lisp I discovered that it reads the CAR into a vector, sorts that, and then puts the values back in the CAR's in sorted order.

--------------
John Thingstad
.



Relevant Pages

  • Re: No Skipweaselling Please - Were Welsh
    ... The other aspect that drivers don't give enough weight to is the erratic ... Insurance companies don't penalise powerful cars for nothing - they know ... - that sort of thing. ... There would of course be gun owners who thought ...
    (uk.rec.sheds)
  • Re: the sort function in lisp (destructive)
    ... RJ> Another alternative would be a SORT that does not reorder the CONS ... but the CARs of the CONS cells. ... RJ> data structure and then set the list's CARs from there. ...
    (comp.lang.lisp)
  • Re: OT - BBC TV - Ping my British friends!
    ... Mike Brown wrote: ... obsolete ideas - such as the more cars, and the bigger they are, the ... I read all this carefully and he seems like an OK sort of bloke to me. ... You know there are things about which one does not joke. ...
    (rec.music.makers.guitar.acoustic)
  • Re: inverse sort on key?
    ... Some cars may have the same speed. ... The catch is that I want to sort by highest speed, ... compare method in my object, ... Support duplicate objects. ...
    (comp.lang.java.programmer)
  • Re: inverse sort on key?
    ... I want to store lots of cars in some sort of object that ... Some cars may have the same speed. ... The catch is that I want to sort by highest speed, ... Support duplicate objects. ...
    (comp.lang.java.programmer)