[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Date: Thu, 9 May 91 14:59:02 EDT
From: email@example.com (Anthony Castellano)
I am trying to use sort....and it is killing my list. For example,
(setq x '(4 256 3 2 43 6 3))
(sort x >)
when I eval x I get (4 3 3 2).
This is not what I expected.
Any thoughts??? Is this a bug? I am running AKCL 5.05 on a Sparc.
thanks in advance,
If you look at CLtL, you will find that SORT is destructive. Thus,
you must do
(setq x (sort x #'<))
I think that everyone who has used SORT has gotten bitten by this at
one time or another.
- From: tonyc@starbase.MITRE.ORG (Anthony Castellano)