[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: sort function

From: Paul F. Dietz
Subject: [Gcl-devel] Re: sort function
Date: Sat, 03 Jan 2004 01:41:13 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

(sort '((9 a) (3 b) (4 c)) #'(lambda (x y) (< (car x) (car y))))

((3 B) (4 C) (9 A))

I want to point out that destructively modifying a quoted constant
may (by CLHS 3.7.1) cause undefined behavior.  This should be written:

  (sort (copy-list '((9 a) (3 b) (4 c))) #'(lambda (x y) (< (car x) (car y))))

or similar.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]