19 |
(a b c)) |
(a b c)) |
20 |
|
|
21 |
(deftest ldiff-2 |
(deftest ldiff-2 |
22 |
(handler-case |
(let* ((x (copy-tree '(a b c d e f))) |
23 |
(let* ((x (copy-tree '(a b c d e f))) |
(xcopy (make-scaffold-copy x))) |
24 |
(xcopy (make-scaffold-copy x))) |
(let ((result (ldiff x 'a))) |
25 |
(let ((result (ldiff x 'a))) |
(and |
26 |
(and |
(check-scaffold-copy x xcopy) |
27 |
(check-scaffold-copy x xcopy) |
(zerop |
28 |
(zerop |
(loop |
29 |
(loop |
for a on x and b on result count |
30 |
for a on x and b on result count |
(eqt a b))) |
31 |
(eqt a b))) |
result))) |
|
result))) |
|
|
(error (c) c)) |
|
32 |
(a b c d e f)) |
(a b c d e f)) |
33 |
|
|
34 |
;; Works when the end of the dotted list is a symbol |
;; Works when the end of the dotted list is a symbol |