51 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
52 |
;;; setting of C*R accessors |
;;; setting of C*R accessors |
53 |
|
|
|
(defun create-c*r-test (n) |
|
|
(cond |
|
|
((<= n 0) 'none) |
|
|
(t |
|
|
(cons (create-c*r-test (1- n)) |
|
|
(create-c*r-test (1- n)))))) |
|
|
|
|
54 |
(loop |
(loop |
55 |
for fn in '(car cdr caar cadr cdar cddr |
for fn in '(car cdr caar cadr cdar cddr |
56 |
caaar caadr cadar caddr cdaar cdadr cddar cdddr |
caaar caadr cadar caddr cdaar cdadr cddar cdddr |
120 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
121 |
;;; nth |
;;; nth |
122 |
|
|
|
(defun nth-1-body (x) |
|
|
(loop |
|
|
for e in x |
|
|
and i from 0 |
|
|
count (not (eqt e (nth i x))))) |
|
|
|
|
123 |
(deftest nth-1 |
(deftest nth-1 |
124 |
(nth-1-body (loop for i from 1 to 2000 collect (* 4 i))) |
(nth-1-body (loop for i from 1 to 2000 collect (* 4 i))) |
125 |
0) |
0) |