Andrei Zorine

2020-05-07 21:44:30 UTC

Gentlemen,

I see the following behaviour:

CL-USER> (let ((A\\B (list 1 3)) (AB (list 4 2)))

(union A\\B AB) (print AB))

(4 2)

(4 2)

CL-USER> (let ((A\\B (list 1 3)) (AB (list 4 2)))

(sort (union A\\B AB) #'<) (print AB))

(2 3 4)

So, why does SORTing spoil the list stored in AB?

Sincerely yours,

Andrei Zorine

I see the following behaviour:

CL-USER> (let ((A\\B (list 1 3)) (AB (list 4 2)))

(union A\\B AB) (print AB))

(4 2)

(4 2)

CL-USER> (let ((A\\B (list 1 3)) (AB (list 4 2)))

(sort (union A\\B AB) #'<) (print AB))

(2 3 4)

So, why does SORTing spoil the list stored in AB?

Sincerely yours,

Andrei Zorine