[Ecls-list] order problem

Michael O'Connor moconnor59 at yahoo.com
Mon May 17 13:12:02 UTC 2004

I've got a problem with a piece of code that re-orders
data which isn't working as I'd expect in ECL (but
works as expected when run in CLisp), it can be
illustrated with the following example:

(setf data (list (list "a" 2) (list "b" 1)))
(format t "Before: ~A~%" data)
(sort data (lambda (a b) (< (second a) (second b))))
(format t "After: ~A~%" data)

In ECL the above produces:
Before: ((a 2) (b 1))
After: ((a 2))

I'd expect the final line above to read 'After: ((b 1)
(a 2))'. Am I doing something wrong?



Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.

More information about the ecl-devel mailing list