47 |
(xcopy (make-scaffold-copy x)) |
(xcopy (make-scaffold-copy x)) |
48 |
(result (rassoc 'b x))) |
(result (rassoc 'b x))) |
49 |
(and |
(and |
50 |
(eq result (second x)) |
(eqt result (second x)) |
51 |
(check-scaffold-copy x xcopy))) |
(check-scaffold-copy x xcopy))) |
52 |
t) |
t) |
53 |
|
|
178 |
(copy-tree |
(copy-tree |
179 |
(rev-assoc-list |
(rev-assoc-list |
180 |
'((b . 1) (a . 2) (c . 3)))) |
'((b . 1) (a . 2) (c . 3)))) |
181 |
:test #'(lambda (x y) (and (eq x y) 'matched))) |
:test #'(lambda (x y) (and (eqt x y) 'matched))) |
182 |
(2 . a)) |
(2 . a)) |
183 |
|
|
184 |
;; Check that the order of the arguments to :test is correct |
;; Check that the order of the arguments to :test is correct |
187 |
(block fail |
(block fail |
188 |
(rassoc 'a '((1 . b) (2 . c) (3 . a)) |
(rassoc 'a '((1 . b) (2 . c) (3 . a)) |
189 |
:test #'(lambda (x y) |
:test #'(lambda (x y) |
190 |
(unless (eq x 'a) (return-from fail 'fail)) |
(unless (eqt x 'a) (return-from fail 'fail)) |
191 |
(eq x y)))) |
(eqt x y)))) |
192 |
(3 . A)) |
(3 . A)) |
193 |
|
|
194 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
200 |
(result (rassoc-if #'evenp x))) |
(result (rassoc-if #'evenp x))) |
201 |
(and |
(and |
202 |
(check-scaffold-copy x xcopy) |
(check-scaffold-copy x xcopy) |
203 |
(eq result (third x)) |
(eqt result (third x)) |
204 |
result)) |
result)) |
205 |
(c . 6)) |
(c . 6)) |
206 |
|
|
211 |
(result (rassoc-if #'oddp x :key #'1+))) |
(result (rassoc-if #'oddp x :key #'1+))) |
212 |
(and |
(and |
213 |
(check-scaffold-copy x xcopy) |
(check-scaffold-copy x xcopy) |
214 |
(eq result (third x)) |
(eqt result (third x)) |
215 |
result)) |
result)) |
216 |
(program-error (c) c)) |
(program-error (c) c)) |
217 |
(c . 6)) |
(c . 6)) |
222 |
(result (rassoc-if #'evenp x))) |
(result (rassoc-if #'evenp x))) |
223 |
(and |
(and |
224 |
(check-scaffold-copy x xcopy) |
(check-scaffold-copy x xcopy) |
225 |
(eq result (fourth x)) |
(eqt result (fourth x)) |
226 |
result)) |
result)) |
227 |
(c . 6)) |
(c . 6)) |
228 |
|
|
240 |
(result (rassoc-if-not #'oddp x))) |
(result (rassoc-if-not #'oddp x))) |
241 |
(and |
(and |
242 |
(check-scaffold-copy x xcopy) |
(check-scaffold-copy x xcopy) |
243 |
(eq result (third x)) |
(eqt result (third x)) |
244 |
result)) |
result)) |
245 |
(c . 6)) |
(c . 6)) |
246 |
|
|
251 |
(result (rassoc-if-not #'evenp x :key #'1+))) |
(result (rassoc-if-not #'evenp x :key #'1+))) |
252 |
(and |
(and |
253 |
(check-scaffold-copy x xcopy) |
(check-scaffold-copy x xcopy) |
254 |
(eq result (third x)) |
(eqt result (third x)) |
255 |
result)) |
result)) |
256 |
(program-error (c) c)) |
(program-error (c) c)) |
257 |
(c . 6)) |
(c . 6)) |
262 |
(result (rassoc-if-not #'oddp x))) |
(result (rassoc-if-not #'oddp x))) |
263 |
(and |
(and |
264 |
(check-scaffold-copy x xcopy) |
(check-scaffold-copy x xcopy) |
265 |
(eq result (fourth x)) |
(eqt result (fourth x)) |
266 |
result)) |
result)) |
267 |
(c . 6)) |
(c . 6)) |
268 |
|
|