(eql (length "abc") 3)
(let ((str (make-array '(3) :element-type 'character
:initial-contents "abc"
:fill-pointer t)))
(and (eql (length str) 3)
(eql (setf (fill-pointer str) 2) 2)
(eql (length str) 2)))
(zerop (length #*))
(zerop (length ""))
(zerop (length #()))
(zerop (length ()))
(eql (length '(0)) 1)
(eql (length '(0 1)) 2)
(eql (length '(0 1 2)) 3)
(eql (length '(0 1 2 3)) 4)
(eql (length '(0 1 2 3 4)) 5)
(eql (length '(0 1 2 3 4 5)) 6)
(eql (length '(0 1 2 3 4 5 6)) 7)
(eql (length #(0)) 1)
(eql (length #(0 1)) 2)
(eql (length #(0 1 2)) 3)
(eql (length #(0 1 2 3)) 4)
(eql (length #(0 1 2 3 4)) 5)
(eql (length #(0 1 2 3 4 5)) 6)
(eql (length #(0 1 2 3 4 5 6)) 7)
(eql (length (make-array 100)) 100)
(eql (length (make-sequence 'list 20)) 20)
(eql (length (make-sequence 'string 10)) 10)
(eql (length (make-sequence 'bit-vector 3)) 3)
(eql (length (make-sequence 'bit-vector 64)) 64)
(eql (length (make-sequence 'simple-vector 64)) 64)
(string= (copy-seq "love") "love")
(equalp (copy-seq '#(a b c d)) '#(a b c d))
(equalp (copy-seq '#*01010101) '#*01010101)
(equal (copy-seq '(love)) '(love))
(equal (copy-seq '(love hate war peace)) '(love hate war peace))
(null (copy-seq nil))
(string= (copy-seq "") "")
(let* ((seq0 "love&peace")
(seq (copy-seq seq0)))
(and (not (eq seq0 seq))
(string= seq0 seq)))
(let* ((seq0 (list 'love 'and 'peace))
(seq (copy-seq seq0)))
(and (not (eq seq0 seq))
(equal seq0 seq)))
(let* ((c0 (list 'love))
(c1 (list 'peace))
(seq (copy-seq (list c0 c1))))
(and (equal seq '((love) (peace)))
(eq (car seq) c0)
(eq (cadr seq) c1)))
(let* ((seq0 '#(t nil t nil))
(seq (copy-seq seq0)))
(and (not (eq seq0 seq))
(equalp seq seq0)))
(vectorp (copy-seq (vector)))
(simple-bit-vector-p (copy-seq #*))
(simple-vector-p (copy-seq (vector)))
(simple-vector-p (copy-seq (make-array 10
:fill-pointer 3
:initial-element nil)))
(simple-vector-p (copy-seq (vector 0 1)))
(simple-string-p (copy-seq "xyz"))
(simple-string-p (copy-seq (make-array 3
:displaced-to "0123456789"
:displaced-index-offset 3
:element-type 'base-char)))
(simple-string-p (copy-seq (make-array 20
:fill-pointer t
:element-type 'base-char
:initial-element #\Space)))
(simple-bit-vector-p (copy-seq #*0101))
(simple-bit-vector-p (copy-seq (make-array 30
:fill-pointer 3
:element-type 'bit
:initial-element 0)))
(let* ((vec0 (make-array 10 :fill-pointer 3 :initial-contents "0123456789"))
(vec (copy-seq vec0)))
(and (simple-vector-p vec)
(= (length vec) 3)
(equalp vec #(#\0 #\1 #\2))))
(char= (elt "0123456789" 6) #\6)
(eq (elt #(a b c d e f g) 0) 'a)
(eq (elt '(a b c d e f g) 4) 'e)
(zerop (elt #*0101010 0))
(dotimes (i 10 t)
(unless (char= (elt "0123456789" i) (digit-char i))
(return nil)))
(let ((str (copy-seq "0123456789")))
(and (char= (elt str 6) #\6)
(setf (elt str 0) #\#)
(string= str "#123456789")))
(let ((list (list 0 1 2 3)))
(and (= (elt list 2) 2)
(setf (elt list 1) 9)
(= (elt list 1) 9)
(equal list '(0 9 2 3))))
(let ((bv #*0101010101))
(dotimes (i 10 t)
(unless (= (elt bv i) (if (evenp i) 0 1))
(return nil))))
(let ((vec (vector 'a 'b 'c)))
(and (eq (elt vec 0) 'a)
(eq (elt vec 1) 'b)
(eq (elt vec 2) 'c)))
(let ((list (list 0 1 2 3)))
(and (eq (fill list 'nil) list)
(every 'null list)))
(let ((vector (vector 'x 'y 'z)))
(and (eq (fill vector 'a) vector)
(every #'(lambda (arg) (eq arg 'a)) vector)))
(let ((list (list 0 1 2 3)))
(and (eq (fill list '9 :start 2) list)
(equal list '(0 1 9 9))))
(let ((list (list 0 1 2 3)))
(and (eq (fill list '9 :start 1 :end 3) list)
(equal list '(0 9 9 3))))
(let ((list (list 0 1 2 3)))
(and (eq (fill list '9 :start 1 :end nil) list)
(equal list '(0 9 9 9))))
(let ((list (list 0 1 2 3)))
(and (eq (fill list '9 :end 1) list)
(equal list '(9 1 2 3))))
(let ((vector (vector 0 1 2 3)))
(and (eq (fill vector 't :start 3) vector)
(equalp vector '#(0 1 2 t))))
(let ((vector (vector 0 1 2 3)))
(and (eq (fill vector 't :start 2 :end 4) vector)
(equalp vector '#(0 1 t t))))
(let ((vector (vector 0 1 2 3)))
(and (eq (fill vector 't :start 2 :end nil) vector)
(equalp vector '#(0 1 t t))))
(let ((vector (vector 0 1 2 3)))
(and (eq (fill vector 't :end 3) vector)
(equalp vector '#(t t t 3))))
(null (make-sequence 'list 0))
(string= (make-sequence 'string 26 :initial-element #\.)
"..........................")
(equalp (make-sequence '(vector double-float) 2
:initial-element 1d0)
#(1.0d0 1.0d0))
(equal (make-sequence 'list 3 :initial-element 'a)
'(a a a))
(equal (make-sequence 'cons 3 :initial-element 'a)
'(a a a))
(null (make-sequence 'null 0 :initial-element 'a))
(equalp (make-sequence 'vector 3 :initial-element 'z)
'#(z z z))
(equalp (make-sequence '(vector * *) 3 :initial-element 'z)
'#(z z z))
(equalp (make-sequence '(vector t *) 3 :initial-element 'z)
'#(z z z))
(string= (make-sequence '(string 3) 3 :initial-element '#\a)
"aaa")
(string= (make-sequence 'string 4 :initial-element '#\z)
"zzzz")
(string= (make-sequence '(vector character 3) 3 :initial-element '#\a)
"aaa")
(equalp (make-sequence '(array t 1) 3 :initial-element 'z)
'#(z z z))
(equalp (make-sequence '(array t (3)) 3 :initial-element 'z)
'#(z z z))
(vectorp (make-sequence 'vector 10))
(string= (subseq "012345" 2) "2345")
(string= (subseq "012345" 3 5) "34")
(let ((str (copy-seq "012345")))
(and (setf (subseq str 4) "abc")
(string= str "0123ab")))
(let ((str (copy-seq "012345")))
(setf (subseq str 0 2) "A")
(string= str "A12345"))
(equal (subseq '(0 1 2 3) 0) '(0 1 2 3))
(equal (subseq '(0 1 2 3) 1) '(1 2 3))
(equal (subseq '(0 1 2 3) 2) '(2 3))
(equal (subseq '(0 1 2 3) 3) '(3))
(equal (subseq '(0 1 2 3) 4) '())
(equalp (subseq #(a b c d) 0) #(a b c d))
(equalp (subseq #(a b c d) 1) #(b c d))
(equalp (subseq #(a b c d) 2) #(c d))
(equalp (subseq #(a b c d) 3) #(d))
(equalp (subseq #(a b c d) 4) #())
(string= (subseq "0123" 0) "0123")
(string= (subseq "0123" 1) "123")
(string= (subseq "0123" 2) "23")
(string= (subseq "0123" 3) "3")
(string= (subseq "0123" 4) "")
(equalp (subseq #*1010 0) #*1010)
(equalp (subseq #*1010 1) #*010)
(equalp (subseq #*1010 2) #*10)
(equalp (subseq #*1010 3) #*0)
(equalp (subseq #*1010 4) #*)
(equal (subseq '(0 1 2 3) 0 4) '(0 1 2 3))
(equal (subseq '(0 1 2 3) 0 nil) '(0 1 2 3))
(let* ((list0 '(0 1 2 3))
(list (subseq list0 0 4)))
(and (not (eq list0 list))
(equal list0 list)))
(let* ((list0 '(0 1 2 3))
(list (subseq list0 0 nil)))
(and (not (eq list0 list))
(equal list0 list)))
(equal (subseq '(0 1 2 3) 1 3) '(1 2))
(equal (subseq '(0 1 2 3) 2 2) '())
(equal (subseq '(0 1 2 3) 0 0) '())
(equal (subseq '(0 1 2 3) 1 1) '())
(equal (subseq '(0 1 2 3) 2 2) '())
(equal (subseq '(0 1 2 3) 3 3) '())
(equal (subseq '(0 1 2 3) 4 4) '())
(let ((list (list 0 1 2 3 4 5 6 7)))
(setf (subseq list 0) '(a b c d))
(equal list '(a b c d 4 5 6 7)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 0) '(a b c d))
(equal list '(a b c d)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 2) '(a b c d))
(equal list '(0 1 a b)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 2 nil) '(a b c d))
(equal list '(0 1 a b)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 1 3) '(a b c d))
(equal list '(0 a b 3)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 0) '())
(equal list '(0 1 2 3)))
(let ((list '()))
(setf (subseq list 0) '(a b c d e))
(null list))
(let ((list '(0 1 2 3)))
(setf (subseq list 0 0) '(a b c d e))
(equal list '(0 1 2 3)))
(let ((list '(0 1 2 3)))
(setf (subseq list 1 1) '(a b c d e))
(equal list '(0 1 2 3)))
(let ((list '(0 1 2 3)))
(setf (subseq list 2 2) '(a b c d e))
(equal list '(0 1 2 3)))
(let ((list '(0 1 2 3)))
(setf (subseq list 3 3) '(a b c d e))
(equal list '(0 1 2 3)))
(let ((list '(0 1 2 3)))
(setf (subseq list 4 4) '(a b c d e))
(equal list '(0 1 2 3)))
(let ((list (list 0 1 2 3 4 5 6 7)))
(setf (subseq list 0) #(a b c d))
(equal list '(a b c d 4 5 6 7)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 0) #(a b c d))
(equal list '(a b c d)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 2) #(a b c d))
(equal list '(0 1 a b)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 2 nil) #(a b c d))
(equal list '(0 1 a b)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 1 3) #(a b c d))
(equal list '(0 a b 3)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 0) #())
(equal list '(0 1 2 3)))
(let ((list (list 0 1 2 3 4 5 6 7)))
(setf (subseq list 0) "abcd")
(equal list '(#\a #\b #\c #\d 4 5 6 7)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 0) "abcd")
(equal list '(#\a #\b #\c #\d)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 2) "abcd")
(equal list '(0 1 #\a #\b)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 2 nil) "abcd")
(equal list '(0 1 #\a #\b)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 1 3) "abcd")
(equal list '(0 #\a #\b 3)))
(let ((list (list 0 1 2 3)))
(setf (subseq list 0) "")
(equal list '(0 1 2 3)))
(equalp (subseq #(0 1 2 3) 0 4) #(0 1 2 3))
(equalp (subseq #(0 1 2 3) 0 nil) #(0 1 2 3))
(let* ((vec0 #(0 1 2 3))
(vec (subseq vec0 0 4)))
(and (not (eq vec0 vec))
(equalp vec0 vec)))
(let* ((vec0 #(0 1 2 3))
(vec (subseq vec0 0 nil)))
(and (not (eq vec0 vec))
(equalp vec0 vec)))
(equalp (subseq #(0 1 2 3) 1 3) #(1 2))
(equalp (subseq #(0 1 2 3) 2 2) #())
(equalp (subseq #(0 1 2 3) 0 0) #())
(equalp (subseq #(0 1 2 3) 1 1) #())
(equalp (subseq #(0 1 2 3) 2 2) #())
(equalp (subseq #(0 1 2 3) 3 3) #())
(equalp (subseq #(0 1 2 3) 4 4) #())
(let ((vec (vector 0 1 2 3 4 5 6 7)))
(setf (subseq vec 0) #(a b c d))
(equalp vec #(a b c d 4 5 6 7)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 0) #(a b c d))
(equalp vec #(a b c d)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 2) #(a b c d))
(equalp vec #(0 1 a b)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 1 3) #(a b c d))
(equalp vec #(0 a b 3)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 0) #())
(equalp vec #(0 1 2 3)))
(let ((vec (vector)))
(setf (subseq vec 0) #(a b c d e))
(equalp vec #()))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 0 0) #(a b c d e))
(equalp vec #(0 1 2 3)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 1 1) #(a b c d e))
(equalp vec #(0 1 2 3)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 2 2) #(a b c d e))
(equalp vec #(0 1 2 3)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 3 3) #(a b c d e))
(equalp vec #(0 1 2 3)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 4 4) #(a b c d e))
(equalp vec #(0 1 2 3)))
(let ((vec (vector 0 1 2 3 4 5 6 7)))
(setf (subseq vec 0) #(a b c d))
(equalp vec #(a b c d 4 5 6 7)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 0) #(a b c d))
(equalp vec #(a b c d)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 2) #(a b c d))
(equalp vec #(0 1 a b)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 2 nil) #(a b c d))
(equalp vec #(0 1 a b)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 1 3) #(a b c d))
(equalp vec #(0 a b 3)))
(let ((vec (vector 0 1 2 3)))
(setf (subseq vec 0) #())
(equalp vec #(0 1 2 3)))
(HANDLER-CASE (PROGN (MAP 'SYMBOL #'+ '(0 1) '(1 0)))
(TYPE-ERROR NIL T)
(ERROR NIL NIL)
(:NO-ERROR (&REST REST) (DECLARE (IGNORE REST)) NIL))
(HANDLER-CASE (PROGN (MAP 'HASH-TABLE #'+ '(0 1) '(1 0)))
(TYPE-ERROR NIL T)
(ERROR NIL NIL)
(:NO-ERROR (&REST REST) (DECLARE (IGNORE REST)) NIL))
(string= (map 'string #'(lambda (x y)
(char "01234567890ABCDEF" (mod (+ x y) 16)))
'(1 2 3 4)
'(10 9 8 7))
"AAAA")
(let ((seq (list "lower" "UPPER" "" "123")))
(and (null (map nil #'nstring-upcase seq))
(equal seq '("LOWER" "UPPER" "" "123"))))
(equal (map 'list #'- '(1 2 3 4)) '(-1 -2 -3 -4))
(string= (map 'string
#'(lambda (x) (if (oddp x) #\1 #\0))
'(1 2 3 4))
"1010")
(equal (map 'list '+ '(0 1) '(1 0)) '(1 1))
(equal (map 'list '- '(0 1) '(1 0)) '(-1 1))
(every 'null (list (map 'list #'+ '())
(map 'list #'+ '() '())
(map 'list #'+ '() '() '())
(map 'list #'+ '() '() '() '())
(map 'list #'+ '() '() '() '() '())))
(every 'null (list (map 'list #'+ '())
(map 'list #'+ #() '())
(map 'list #'+ '() #() '())
(map 'list #'+ #() '() #() '())
(map 'list #'+ '() #() '() #() '())))
(equal (map 'list #'+ '(0 1 2)) '(0 1 2))
(equal (map 'list #'+ '(0 1 2) '(1 2 3)) '(1 3 5))
(equal (map 'list #'+ '(0 1 2) '(1 2 3) '(2 3 4)) '(3 6 9))
(equal (map 'list #'+ '(0 1 2) '(1 2 3) '(2 3 4) '(3 4 5)) '(6 10 14))
(equal (map 'list #'+ '(1 2) '(1 2 3)) '(2 4))
(equal (map 'list #'+ '(0 1 2) '(2 3) '(2 3 4)) '(4 7))
(equal (map 'list #'+ '(0 1 2) '(1 2 3) '(2) '(3 4 5)) '(6))
(equal (map 'list #'+ '(0 1 2) '(1 2 3) '(2 3 4) '(3 4 5) '()) '())
(equal (map 'cons #'+ '(0 1 2) '(2 1 0)) '(2 2 2))
(progn
#-clisp (equal (map '(cons number cons) #'+ '(0 1 2) '(2 1 0)) '(2 2 2))
#+clisp 'skipped)
(progn
#-clisp (equal (map '(cons number (cons number *)) #'+ '(0 1 2) '(2 1 0)) '(2 2 2))
#+clisp 'skipped)
(null (map 'null #'+ '()))
(equalp (map 'vector #'+ #()) #())
(equalp (map 'vector #'+ #() #()) #())
(equalp (map 'vector #'+ #() #() #()) #())
(equalp (map 'vector #'+ #() #() #() #()) #())
(equalp (map 'vector #'+ #() #() #() #() #()) #())
(equalp (map 'vector #'+ '() #()) #())
(equalp (map 'vector #'+ '() #() "") #())
(equalp (map 'vector #'+ '(0 1 2)) #(0 1 2))
(equalp (map 'vector #'+ '(0 1 2) #(1 2 3)) #(1 3 5))
(equalp (map 'vector #'+ #(0 1 2) '(1 2 3) #(2 3 4)) #(3 6 9))
(equalp (map 'vector #'+ '(0 1 2) #(1 2 3) '(2 3 4) #(3 4 5)) #(6 10 14))
(equalp (map 'vector #'+ '(1 2) '(1 2 3)) #(2 4))
(equalp (map 'vector #'+ '(0 1 2) '(2 3) '(2 3 4)) #(4 7))
(equalp (map 'vector #'+ '(0 1 2) '(1 2 3) '(2) '(3 4 5)) #(6))
(equalp (map 'vector #'+ '(0 1 2) '(1 2 3) '(2 3 4) '(3 4 5) '()) #())
(equalp (map 'vector #'+ #(1 2) #(1 2 3)) #(2 4))
(equalp (map 'vector #'+ #(0 1 2) #(2 3) #(2 3 4)) #(4 7))
(equalp (map 'vector #'+ #(0 1 2) '(1 2 3) #(2) '(3 4 5)) #(6))
(equalp (map 'vector #'+ '(0 1 2) #(1 2 3) '(2 3 4) '(3 4 5) '()) #())
(string= (map 'string #'(lambda (&rest rest) (char-upcase (car rest))) "") "")
(string= (map 'string #'(lambda (&rest rest) (char-upcase (car rest))) "" "")
"")
(string= (map 'string
#'(lambda (&rest rest) (char-upcase (car rest)))
"" "" "")
"")
(string= (map 'string
#'(lambda (&rest rest) (char-upcase (car rest)))
"" "" "" "")
"")
(string= (map 'string
#'(lambda (&rest rest) (char-upcase (car rest)))
"" "" "" "" "")
"")
(string= (map 'string #'(lambda (&rest rest) (char-upcase (car rest))) "") "")
(string= (map 'string #'(lambda (&rest rest) (char-upcase (car rest))) "" '())
"")
(string= (map 'string #'(lambda (&rest rest) (char-upcase (car rest)))
"" #() '()) "")
(string= (map 'string #'(lambda (&rest rest) (char-upcase (car rest)))
'() '() "" "") "")
(string= (map 'string #'(lambda (&rest rest) (char-upcase (car rest)))
#() #() #() #() #()) "")
(string= (map 'string
#'(lambda (a b) (if (char< a b) b a))
"axbycz"
"xaybzc")
"xxyyzz")
(string= (map 'string
#'(lambda (a b) (if (char< a b) b a))
"axbycz"
"xayb")
"xxyy")
(string= (map 'string
#'(lambda (&rest rest) (if (zerop (apply #'logand rest)) #\0 #\1))
'(0 1 0 1)
#*1010101)
"0000")
(string= (map 'string
#'(lambda (&rest rest) (if (zerop (apply #'logand rest)) #\0 #\1))
#*1111
#*1010101
#*001)
"001")
(string= (map 'string
#'(lambda (&rest rest) (if (zerop (apply #'logand rest)) #\0 #\1))
#*1111
#*1010101
#*0)
"0")
(string= (map 'string
#'(lambda (&rest rest) (if (zerop (apply #'logand rest)) #\0 #\1))
#*1111
#*1000
#*1011)
"1000")
(let ((list ()))
(and (null (map nil
#'(lambda (&rest rest)
(setq list (cons (apply #'+ rest) list)))
'(0 1 2 3)
'(1 2 3 4)))
(equal list '(7 5 3 1))))
(let ((list ()))
(and (null (map nil
#'(lambda (&rest rest)
(setq list (cons (apply #'+ rest) list)))
'(0 1 2 3)
'(1 2 3 4)
'(2 3 4 5)))
(equal list (reverse '(3 6 9 12)))))
(let ((list ()))
(and (null (map nil
#'(lambda (&rest rest)
(setq list (cons (apply #'+ rest) list)))
'(0 1 2 3)
'(1)
'(2 3 4 5)))
(equal list '(3))))
(equalp (map '(vector * 2) #'+ #*01 #*10) #(1 1))
(equalp (map '(simple-vector 2) #'+ #*01 #*10) #(1 1))
(equalp (map '(array * 1) #'+ #*01 #*10) #(1 1))
(equalp (map '(simple-array * 1) #'+ #*01 #*10) #(1 1))
(equalp (map '(array * (2)) #'+ #*01 #*10) #(1 1))
(equalp (map '(simple-array * (2)) #'+ #*01 #*10) #(1 1))
(string= (map 'string #'char-upcase "abc") "ABC")
(string= (map 'base-string #'char-upcase "abc") "ABC")
(string= (map 'simple-string #'char-upcase "abc") "ABC")
(string= (map '(string 3) #'char-upcase "abc") "ABC")
(string= (map '(base-string 3) #'char-upcase "abc") "ABC")
(string= (map '(simple-string 3) #'char-upcase "abc") "ABC")
(string= (map '(vector character) #'char-upcase "abc") "ABC")
(string= (map '(vector character 3) #'char-upcase "abc") "ABC")
(string= (map '(vector base-char) #'char-upcase "abc") "ABC")
(string= (map '(vector base-char 3) #'char-upcase "abc") "ABC")
(string= (map '(vector standard-char) #'char-upcase "abc") "ABC")
(string= (map '(vector standard-char 3) #'char-upcase "abc") "ABC")
(string= (map '(array character 1) #'char-upcase "abc") "ABC")
(string= (map '(array character (3)) #'char-upcase "abc") "ABC")
(string= (map '(array base-char 1) #'char-upcase "abc") "ABC")
(string= (map '(array base-char (3)) #'char-upcase "abc") "ABC")
(string= (map '(array standard-char 1) #'char-upcase "abc") "ABC")
(string= (map '(array standard-char (3)) #'char-upcase "abc") "ABC")
(equalp (map 'bit-vector #'logand '(0 1 0 1) #*1010) #*0000)
(equalp (map 'simple-bit-vector #'logand '(0 1 0 1) #*1010) #*0000)
(equalp (map '(bit-vector 4) #'logand '(0 1 0 1) #*1010) #*0000)
(equalp (map '(simple-bit-vector 4) #'logand '(0 1 0 1) #*1010) #*0000)
(equalp (map '(array bit 1) #'logand '(0 1 0 1) #*1010) #*0000)
(equalp (map '(array bit (4)) #'logand '(0 1 0 1) #*1010) #*0000)
(equalp (map '(simple-array bit 1) #'logand '(0 1 0 1) #*1010) #*0000)
(equalp (map '(simple-array bit (4)) #'logand '(0 1 0 1) #*1010) #*0000)
(equalp (map '(vector bit) #'logand '(0 1 0 1) #*1010) #*0000)
(equalp (map '(vector bit 4) #'logand '(0 1 0 1) #*1010) #*0000)
(equal (map 'list #'+ '(0 1 2 3) #(3 2 1 0) #*0101) '(3 4 3 4))
(equalp (map 'vector #'+ '(0 1 2 3) #(3 2 1 0) #*0101) #(3 4 3 4))
(let ((a (list 1 2 3 4))
(b (list 10 10 10 10)))
(and (equal (map-into a #'+ a b) '(11 12 13 14))
(equal a '(11 12 13 14))
(equal b '(10 10 10 10))))
(let ((a '(11 12 13 14))
(k '(one two three)))
(equal (map-into a #'cons k a) '((ONE . 11) (TWO . 12) (THREE . 13) 14)))
(null (map-into nil 'identity))
(null (map-into nil #'identity))
(null (map-into nil #'identity '()))
(null (map-into nil #'identity '(0 1 2) '(9 8 7)))
(let ((list (list 0 1 2)))
(and (eq (map-into list 'identity) list)
(equal list '(0 1 2))))
(let ((list (list 0 1 2)))
(and (eq (map-into list 'identity '()) list)
(equal list '(0 1 2))))
(let ((vec (vector 0 1 2)))
(and (eq (map-into vec 'identity) vec)
(equalp vec #(0 1 2))))
(let ((vec (vector 0 1 2)))
(and (eq (map-into vec 'identity #()) vec)
(equalp vec #(0 1 2))))
(let ((vec (vector 0 1 2)))
(and (eq (map-into vec #'+ #() '() #()) vec)
(equalp vec #(0 1 2))))
(equal (map-into (list nil nil) '+ '(0 1) '(1 0)) '(1 1))
(equal (map-into (list nil nil) '- '(0 1) '(1 0)) '(-1 1))
(let ((list (make-list 3 :initial-element nil)))
(and (eq (map-into list #'+ '(0 1 2)) list)
(equal list '(0 1 2))))
(let ((list (make-list 3 :initial-element nil)))
(and (eq (map-into list #'+ '(0 1 2) '(1 2 3)) list)
(equal list '(1 3 5))))
(let ((list (make-list 3 :initial-element nil)))
(and (eq (map-into list #'+ '(0 1 2) '(1 2 3) '(2 3 4)) list)
(equal list '(3 6 9))))
(let ((list (make-list 3 :initial-element nil)))
(and (eq (map-into list #'+ '(1 2) '(1 2 3)) list)
(equal list '(2 4 nil))))
(let ((list (make-list 1 :initial-element nil)))
(and (eq (map-into list #'+ '(1 2 3) '(1 2 3)) list)
(equal list '(2))))
(let ((list (make-list 3 :initial-element nil)))
(and (eq (map-into list #'+ '(1 2 3 4) '(1 2 3) '(0)) list)
(equal list '(2 nil nil))))
(let ((vec (make-sequence 'vector 3 :initial-element nil)))
(and (eq (map-into vec #'+ '(0 1 2)) vec)
(equalp vec #(0 1 2))))
(let ((vec (make-sequence 'vector 3 :initial-element nil)))
(and (eq (map-into vec #'+ '(0 1 2) #(1 2 3)) vec)
(equalp vec #(1 3 5))))
(let ((vec (make-sequence 'vector 3 :initial-element nil)))
(and (eq (map-into vec #'+ '(0 1 2) '(1 2 3) #(2 3 4)) vec)
(equalp vec #(3 6 9))))
(let ((vec (make-sequence 'vector 3 :initial-element nil)))
(and (eq (map-into vec #'+ '(1 2) #(1 2 3)) vec)
(equalp vec #(2 4 nil))))
(let ((vec (make-sequence 'vector 1 :initial-element nil)))
(and (eq (map-into vec #'+ '(1 2) #(1 2 3)) vec)
(equalp vec #(2))))
(let ((vec (make-sequence 'vector 3 :initial-element nil)))
(and (eq (map-into vec #'+ '(1 2 3 4) #(1 2 3) '(0)) vec)
(equalp vec #(2 nil nil))))
(let ((str (make-array 10
:element-type 'character
:initial-contents "0123456789"
:fill-pointer 3)))
(and (eq (map-into str #'char-upcase "abcde") str)
(string= str "ABCDE")
(= (fill-pointer str) 5)))
(let ((vec (make-array 5
:initial-contents #(0 1 2 3 4)
:fill-pointer 3)))
(and (eq (map-into vec #'+ '(0 1 2 3 4 5 6 7 8 9) '(9 8 7 6 5 4 3 2 1 0)) vec)
(equalp vec #(9 9 9 9 9))))
(let ((vec (make-array 5
:initial-contents #(0 1 2 3 4)
:fill-pointer 3)))
(and (eq (map-into vec #'+ '(0 1) '(9 8 7 6 5 4 3 2 1 0)) vec)
(equalp vec #(9 9))))
(let ((vec (make-array 5
:element-type 'bit
:initial-contents #(1 1 1 1 1)
:fill-pointer 3)))
(and (eq (map-into vec #'logand '(0 1) '(1 0 1 0 1 0)) vec)
(equalp vec #*00)))
(eql (reduce #'* '(1 2 3 4 5)) 120)
(equal (reduce #'append '((1) (2)) :initial-value '(i n i t)) '(I N I T 1 2))
(equal (reduce #'append '((1) (2))
:from-end t
:initial-value '(i n i t))
'(1 2 I N I T))
(eql (reduce #'- '(1 2 3 4)) -8)
(eql (reduce #'- '(1 2 3 4) :from-end t) -2)
(eql (reduce #'+ '()) 0)
(eql (reduce #'+ '(3)) 3)
(eq (reduce #'+ '(foo)) 'foo)
(equal (reduce #'list '(1 2 3 4)) '(((1 2) 3) 4))
(equal (reduce #'list '(1 2 3 4) :from-end t) '(1 (2 (3 4))))
(equal (reduce #'list '(1 2 3 4) :initial-value 'foo) '((((foo 1) 2) 3) 4))
(equal (reduce #'list '(1 2 3 4) :from-end t :initial-value 'foo)
'(1 (2 (3 (4 foo)))))
(equal (reduce #'list '(0 1 2 3)) '(((0 1) 2) 3))
(equal (reduce #'list '(0 1 2 3) :start 1) '((1 2) 3))
(equal (reduce #'list '(0 1 2 3) :start 1 :end nil) '((1 2) 3))
(equal (reduce #'list '(0 1 2 3) :start 2) '(2 3))
(eq (reduce #'list '(0 1 2 3) :start 0 :end 0) '())
(eq (reduce #'list '(0 1 2 3) :start 0 :end 0 :initial-value 'initial-value)
'initial-value)
(eq (reduce #'list '(0 1 2 3) :start 2 :end 2) '())
(eq (reduce #'list '(0 1 2 3) :start 2 :end 2 :initial-value 'initial-value)
'initial-value)
(eq (reduce #'list '(0 1 2 3) :start 4 :end 4) '())
(eq (reduce #'list '(0 1 2 3) :start 4 :end 4 :initial-value 'initial-value)
'initial-value)
(eql (reduce #'list '(0 1 2 3) :start 2 :end 3) 2)
(equal (reduce #'list '(0 1 2 3) :start 2 :end 3 :initial-value 'initial-value)
'(initial-value 2))
(eql (reduce #'+ '(0 1 2 3 4 5 6 7 8 9)) 45)
(eql (reduce #'- '(0 1 2 3 4 5 6 7 8 9)) -45)
(eql (reduce #'- '(0 1 2 3 4 5 6 7 8 9) :from-end t) -5)
(equal (reduce #'list '(0 1 2 3) :initial-value 'initial-value)
'((((initial-value 0) 1) 2) 3))
(equal (reduce #'list '(0 1 2 3) :from-end t) '(0 (1 (2 3))))
(equal (reduce #'list '((1) (2) (3) (4)) :key #'car) '(((1 2) 3) 4))
(equal (reduce #'list '((1) (2) (3) (4)) :key #'car :from-end nil)
'(((1 2) 3) 4))
(equal (reduce #'list '((1) (2) (3) (4)) :key #'car :initial-value 0)
'((((0 1) 2) 3) 4))
(equal (reduce #'list '((1) (2) (3) (4)) :key #'car :from-end t)
'(1 (2 (3 4))))
(equal (reduce #'list '((1) (2) (3) (4))
:key #'car :from-end t :initial-value 5)
'(1 (2 (3 (4 5)))))
(equal (reduce #'list #(0 1 2 3)) '(((0 1) 2) 3))
(equal (reduce #'list #(0 1 2 3) :start 1) '((1 2) 3))
(equal (reduce #'list #(0 1 2 3) :start 1 :end nil) '((1 2) 3))
(equal (reduce #'list #(0 1 2 3) :start 2) '(2 3))
(eq (reduce #'list #(0 1 2 3) :start 0 :end 0) '())
(eq (reduce #'list #(0 1 2 3) :start 0 :end 0 :initial-value 'initial-value)
'initial-value)
(eq (reduce #'list #(0 1 2 3) :start 2 :end 2) '())
(eq (reduce #'list #(0 1 2 3) :start 2 :end 2 :initial-value 'initial-value)
'initial-value)
(eq (reduce #'list #(0 1 2 3) :start 4 :end 4) '())
(eq (reduce #'list #(0 1 2 3) :start 4 :end 4 :initial-value 'initial-value)
'initial-value)
(eql (reduce #'list #(0 1 2 3) :start 2 :end 3) 2)
(equal (reduce #'list #(0 1 2 3) :start 2 :end 3 :initial-value 'initial-value)
'(initial-value 2))
(eql (reduce #'+ #(0 1 2 3 4 5 6 7 8 9)) 45)
(eql (reduce #'- #(0 1 2 3 4 5 6 7 8 9)) -45)
(eql (reduce #'- #(0 1 2 3 4 5 6 7 8 9) :from-end t) -5)
(equal (reduce #'list #(0 1 2 3) :initial-value 'initial-value)
'((((initial-value 0) 1) 2) 3))
(equal (reduce #'list #(0 1 2 3) :from-end t) '(0 (1 (2 3))))
(equal (reduce #'list #((1) (2) (3) (4)) :key #'car) '(((1 2) 3) 4))
(equal (reduce #'list #((1) (2) (3) (4)) :key #'car :from-end nil)
'(((1 2) 3) 4))
(equal (reduce #'list #((1) (2) (3) (4)) :key #'car :initial-value 0)
'((((0 1) 2) 3) 4))
(equal (reduce #'list #((1) (2) (3) (4)) :key #'car :from-end t)
'(1 (2 (3 4))))
(equal (reduce #'list #((1) (2) (3) (4))
:key #'car :from-end t :initial-value 5)
'(1 (2 (3 (4 5)))))
(string= (reduce #'(lambda (&rest rest)
(concatenate 'string
(string (car rest))
(string (char-upcase (cadr rest)))))
"abcdefg"
:initial-value #\Z)
"ZABCDEFG")
(eql (count #\a "how many A's are there in here?") 2)
(eql (count-if-not #'oddp '((1) (2) (3) (4)) :key #'car) 2)
(eql (count-if #'upper-case-p "The Crying of Lot 49" :start 4) 2)
(eql (count #\a (concatenate 'list "how many A's are there in here?")) 2)
(eql (count-if #'alpha-char-p "-a-b-c-0-1-2-3-4-") 3)
(eql (count-if #'alphanumericp "-a-b-c-0-1-2-3-4-") 8)
(eql (count 'nil '(t nil t nil t nil)) 3)
(eql (count 'nil #(t nil t nil t nil)) 3)
(zerop (count 9 '(0 1 2 3 4)))
(zerop (count 'a '(0 1 2 3 4)))
(eql (count 0 '(0 0 0 0 0) :start 1) 4)
(eql (count 0 '(0 0 0 0 0) :start 1 :end nil) 4)
(eql (count 0 '(0 0 0 0 0) :start 2) 3)
(zerop (count 0 '(0 0 0 0) :start 0 :end 0))
(zerop (count 0 '(0 0 0 0) :start 2 :end 2))
(zerop (count 0 '(0 0 0 0) :start 4 :end 4))
(eql (count 0 '(0 0 0 0) :start 2 :end 3) 1)
(eql (count #\a "abcABC" :test #'equalp) 2)
(eql (count #\a "abcABC" :test #'char-equal) 2)
(eql (count '(a) '((x) (y) (z) (a) (b) (c)) :test #'equalp) 1)
(eql (count #\a "abcABC" :test-not (complement #'equalp)) 2)
(eql (count #\a "abcABC" :test-not (complement #'char-equal)) 2)
(eql (count '(a) '((x) (y) (z) (a) (b) (c)) :test-not (complement #'equalp)) 1)
(eql (count 'a '((x) (y) (z) (a) (b) (c)) :key #'car :test #'eq) 1)
(eql (count 'nil '((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr :test #'eq)
3)
(let ((list nil))
(and (eql (count 'a '(a b c d)
:test #'(lambda (a b) (setq list (cons b list)) (eq a b)))
1)
(equal list '(d c b a))))
(let ((list nil))
(and (eql (count 'a '(a b c d)
:test #'(lambda (a b) (setq list (cons b list)) (eq a b))
:from-end t)
1)
(equal list '(a b c d))))
(zerop (count 9 #(0 1 2 3 4)))
(zerop (count 'a #(0 1 2 3 4)))
(eql (count 0 #(0 0 0 0 0) :start 1) 4)
(eql (count 0 #(0 0 0 0 0) :start 1 :end nil) 4)
(eql (count 0 #(0 0 0 0 0) :start 2) 3)
(zerop (count 0 #(0 0 0 0) :start 0 :end 0))
(zerop (count 0 #(0 0 0 0) :start 2 :end 2))
(zerop (count 0 #(0 0 0 0) :start 4 :end 4))
(eql (count 0 #(0 0 0 0) :start 2 :end 3) 1)
(eql (count '(a) #((x) (y) (z) (a) (b) (c)) :test #'equalp) 1)
(eql (count '(a) #((x) (y) (z) (a) (b) (c)) :test-not (complement #'equalp)) 1)
(eql (count 'a #((x) (y) (z) (a) (b) (c)) :key #'car :test #'eq) 1)
(eql (count 'nil #((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr :test #'eq)
3)
(let ((list nil))
(and (eql (count 'a #(a b c d)
:test #'(lambda (a b) (setq list (cons b list)) (eq a b)))
1)
(equal list '(d c b a))))
(let ((list nil))
(and (eql (count 'a #(a b c d)
:test #'(lambda (a b) (setq list (cons b list)) (eq a b))
:from-end t)
1)
(equal list '(a b c d))))
(eql (count-if #'null '(t nil t nil t nil)) 3)
(zerop (count-if #'(lambda (x) (eql x 9)) #(0 1 2 3 4)))
(zerop (count-if #'(lambda (a) (eq 'x a)) #(0 1 2 3 4)))
(eql (count-if #'zerop '(0 0 0 0 0) :start 1) 4)
(eql (count-if #'zerop '(0 0 0 0 0) :start 1 :end nil) 4)
(eql (count-if #'zerop '(0 0 0 0 0) :start 2) 3)
(zerop (count-if #'zerop '(0 0 0 0) :start 0 :end 0))
(zerop (count-if #'zerop '(0 0 0 0) :start 2 :end 2))
(zerop (count-if #'zerop '(0 0 0 0) :start 4 :end 4))
(eql (count-if #'zerop '(0 0 0 0) :start 2 :end 3) 1)
(eql (count-if #'(lambda (x) (equalp #\a x)) "abcABC") 2)
(eql (count-if #'(lambda (x) (char-equal #\a x)) "abcABC") 2)
(eql (count-if #'(lambda (x) (equal x '(a)))
'((x) (y) (z) (a) (b) (c))) 1)
(eql (count-if #'(lambda (x) (eq x 'a))
'((x) (y) (z) (a) (b) (c)) :key #'car)
1)
(eql (count-if 'null '((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr)
3)
(eql (count-if #'(lambda (x) (equal x '(a)))
'((x) (y) (z) (a) (b) (c)))
1)
(eql (count-if #'(lambda (x) (eq x 'a)) '((x) (y) (z) (a) (b) (c)) :key #'car)
1)
(eql (count-if #'null '((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr)
3)
(let ((list nil))
(and (eql (count-if #'(lambda (x) (setq list (cons x list)) (eq x 'a))
'(a b c d))
1)
(equal list '(d c b a))))
(let ((list nil))
(and (eql (count-if #'(lambda (x) (setq list (cons x list)) (eq x 'a))
'(a b c d)
:from-end t)
1)
(equal list '(a b c d))))
(eql (count-if #'null #(t nil t nil t nil)) 3)
(eql (count-if #'zerop #(0 0 0 0 0) :start 1) 4)
(eql (count-if #'zerop #(0 0 0 0 0) :start 1 :end nil) 4)
(eql (count-if #'zerop #(0 0 0 0 0) :start 2) 3)
(zerop (count-if #'zerop #(0 0 0 0) :start 0 :end 0))
(zerop (count-if #'zerop #(0 0 0 0) :start 2 :end 2))
(zerop (count-if #'zerop #(0 0 0 0) :start 4 :end 4))
(eql (count-if #'zerop #(0 0 0 0) :start 2 :end 3) 1)
(eql (count-if #'(lambda (x) (equal x '(a)))
#((x) (y) (z) (a) (b) (c))) 1)
(eql (count-if #'(lambda (x) (eq x 'a))
#((x) (y) (z) (a) (b) (c)) :key #'car)
1)
(eql (count-if #'null #((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr)
3)
(eql (count-if #'(lambda (x) (equal x '(a)))
#((x) (y) (z) (a) (b) (c)))
1)
(eql (count-if #'(lambda (x) (eq x 'a)) #((x) (y) (z) (a) (b) (c)) :key #'car)
1)
(eql (count-if #'null #((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr)
3)
(let ((list nil))
(and (eql (count-if #'(lambda (x) (setq list (cons x list)) (eq x 'a))
#(a b c d))
1)
(equal list '(d c b a))))
(let ((list nil))
(and (eql (count-if #'(lambda (x) (setq list (cons x list)) (eq x 'a))
#(a b c d)
:from-end t)
1)
(equal list '(a b c d))))
(eql (count-if-not (complement #'null) '(t nil t nil t nil)) 3)
(zerop (count-if-not #'(lambda (x) (not (eql x 9))) #(0 1 2 3 4)))
(zerop (count-if-not #'(lambda (a) (not (eq 'x a))) #(0 1 2 3 4)))
(eql (count-if-not (complement #'zerop) '(0 0 0 0 0) :start 1) 4)
(eql (count-if-not (complement #'zerop) '(0 0 0 0 0) :start 1 :end nil) 4)
(eql (count-if-not (complement #'zerop) '(0 0 0 0 0) :start 2) 3)
(zerop (count-if-not (complement #'zerop) '(0 0 0 0) :start 0 :end 0))
(zerop (count-if-not (complement #'zerop) '(0 0 0 0) :start 2 :end 2))
(zerop (count-if-not (complement #'zerop) '(0 0 0 0) :start 4 :end 4))
(eql (count-if-not (complement #'zerop) '(0 0 0 0) :start 2 :end 3) 1)
(eql (count-if-not #'(lambda (x) (not (equalp #\a x))) "abcABC") 2)
(eql (count-if-not #'(lambda (x) (not (char-equal #\a x))) "abcABC") 2)
(eql (count-if-not #'(lambda (x) (not (equal x '(a))))
'((x) (y) (z) (a) (b) (c))) 1)
(eql (count-if-not #'(lambda (x) (not (eq x 'a)))
'((x) (y) (z) (a) (b) (c)) :key #'car)
1)
(eql (count-if-not (complement #'null)
'((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr)
3)
(eql (count-if-not #'(lambda (x) (not (equal x '(a))))
'((x) (y) (z) (a) (b) (c)))
1)
(eql (count-if-not #'(lambda (x) (not (eq x 'a)))
'((x) (y) (z) (a) (b) (c)) :key #'car)
1)
(eql (count-if-not (complement #'null)
'((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr)
3)
(let ((list nil))
(and (eql (count-if-not #'(lambda (x)
(setq list (cons x list))
(not (eq x 'a)))
'(a b c d))
1)
(equal list '(d c b a))))
(let ((list nil))
(and (eql (count-if-not #'(lambda (x)
(setq list (cons x list))
(not (eq x 'a)))
'(a b c d)
:from-end t)
1)
(equal list '(a b c d))))
(eql (count-if-not (complement #'null) #(t nil t nil t nil)) 3)
(eql (count-if-not (complement #'zerop) #(0 0 0 0 0) :start 1) 4)
(eql (count-if-not (complement #'zerop) #(0 0 0 0 0) :start 1 :end nil) 4)
(eql (count-if-not (complement #'zerop) #(0 0 0 0 0) :start 2) 3)
(zerop (count-if-not (complement #'zerop) #(0 0 0 0) :start 0 :end 0))
(zerop (count-if-not (complement #'zerop) #(0 0 0 0) :start 2 :end 2))
(zerop (count-if-not (complement #'zerop) #(0 0 0 0) :start 4 :end 4))
(eql (count-if-not (complement #'zerop) #(0 0 0 0) :start 2 :end 3) 1)
(eql (count-if-not #'(lambda (x) (not (equal x '(a))))
#((x) (y) (z) (a) (b) (c))) 1)
(eql (count-if-not #'(lambda (x) (not (eq x 'a)))
#((x) (y) (z) (a) (b) (c)) :key #'car)
1)
(eql (count-if-not (complement #'null)
#((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr)
3)
(eql (count-if-not #'(lambda (x) (not (equal x '(a))))
#((x) (y) (z) (a) (b) (c)))
1)
(eql (count-if-not #'(lambda (x) (not (eq x 'a)))
#((x) (y) (z) (a) (b) (c)) :key #'car)
1)
(eql (count-if-not (complement #'null)
#((x . x) (y) (z . z) (a) (b . b) (c)) :key #'cdr)
3)
(let ((list nil))
(and (eql (count-if-not #'(lambda (x)
(setq list (cons x list))
(not (eq x 'a)))
#(a b c d))
1)
(equal list '(d c b a))))
(let ((list nil))
(and (eql (count-if-not #'(lambda (x)
(setq list (cons x list))
(not (eq x 'a)))
#(a b c d)
:from-end t)
1)
(equal list '(a b c d))))
(null (reverse nil))
(string= (reverse "") "")
(equalp (reverse #*) #*)
(equalp (reverse #()) #())
(equal (reverse '(0 1 2 3)) '(3 2 1 0))
(string= (reverse "0123") "3210")
(equalp (reverse #*1100) #*0011)
(equalp (reverse #(a b c d)) #(d c b a))
(null (nreverse nil))
(string= (nreverse (copy-seq "")) "")
(equalp (nreverse (copy-seq #*)) #*)
(equalp (nreverse (copy-seq #())) #())
(equal (nreverse (list 0 1 2 3)) '(3 2 1 0))
(string= (nreverse (copy-seq "0123")) "3210")
(equalp (reverse (copy-seq #*1100)) #*0011)
(equalp (reverse (copy-seq #(a b c d))) #(d c b a))
(char= (find #\d "edcba" :test #'char>) #\c)
(eql (find-if #'oddp '(1 2 3 4 5) :end 3 :from-end t) 3)
(null (find-if-not #'complexp
'#(3.5 2 #C(1.0 0.0) #C(0.0 1.0))
:start 2))
(eq (find 'a '(a b c)) 'a)
(eq (find 'b '(a b c)) 'b)
(eq (find 'c '(a b c)) 'c)
(null (find 'x '(a b c)))
(null (find 'a '(a b c) :start 1))
(null (find 'b '(a b c) :start 2))
(null (find 'c '(a b c) :start 3))
(null (find 'a '(a b c) :start 0 :end 0))
(null (find 'a '(a b c) :start 0 :end 0 :from-end t))
(null (find 'a '(a b c) :start 1 :end 1))
(null (find 'a '(a b c) :start 1 :end 1 :from-end t))
(null (find 'a '(a b c) :start 2 :end 2))
(null (find 'a '(a b c) :start 2 :end 2 :from-end t))
(null (find 'a '(a b c) :start 3 :end 3))
(null (find 'a '(a b c) :start 3 :end 3 :from-end t))
(eq (find 'a '(a b c) :end nil) 'a)
(eq (find 'b '(a b c) :end nil) 'b)
(eq (find 'c '(a b c) :end nil) 'c)
(eq (find 'a '(a b c) :end 1) 'a)
(eq (find 'b '(a b c) :end 2) 'b)
(eq (find 'c '(a b c) :end 3) 'c)
(null (find 'a '(a b c) :end 0))
(null (find 'b '(a b c) :end 1))
(null (find 'c '(a b c) :end 2))
(null (find 'a '((a) (b) (c))))
(equal (find 'a '((a) (b) (c)) :key #'car) '(a))
(equal (find 'b '((a) (b) (c)) :key #'car) '(b))
(equal (find 'c '((a) (b) (c)) :key #'car) '(c))
(null (find 'z '((a) (b) (c)) :key #'car))
(let ((list '((a) (b) (c))))
(and (eq (find 'a list :key #'car) (car list))
(eq (find 'b list :key #'car) (cadr list))
(eq (find 'c list :key #'car) (caddr list))
(null (find 'z list :key #'car))))
(null (find '(a) '((a) (b) (c))))
(equal (find '(a) '((a) (b) (c)) :test #'equal) '(a))
(null (find '("a") '(("a") ("b") ("c"))))
(null (find '("a") '(("A") ("B") ("c")) :test #'equal))
(equal (find '("a") '(("A") ("B") ("c")) :test #'equalp) '("A"))
(eq (find 'nil '(first second third) :test (constantly t)) 'first)
(eql (find 3 '(0 1 2 3 4 5)) 3)
(eql (find 3 '(0 1 2 3 4 5) :test #'<) 4)
(eql (find 3 '(0 1 2 3 4 5) :test #'>) 0)
(equal (find '(a) '((a) (b) (c)) :test-not (complement #'equal)) '(a))
(null (find '("a") '(("A") ("B") ("c")) :test-not (complement #'equal)))
(equal (find '("a") '(("A") ("B") ("c")) :test-not (complement #'equalp))
'("A"))
(eq (find 'nil '(first second third) :test-not (constantly nil)) 'first)
(eql (find 3 '(0 1 2 3 4 5) :test-not #'>=) 4)
(eql (find 3 '(0 1 2 3 4 5) :test-not #'<=) 0)
(equal (find 'a '((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(a))
(equal (find 'a '((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(a a))
(equal (find 'b '((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(b))
(equal (find 'b '((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(b b))
(equal (find 'c '((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(c))
(equal (find 'c '((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(c c))
(null (find 'z '((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (find 'z '((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(equal (find 'a '((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
'(a a a))
(equal (find 'a '((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
'(a a a))
(equal (find 'a '((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
'(a a))
(null (find 'a '((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (find #\c '("abc" "bcd" "cde")))
(string= (find #\c '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0))
:test #'char=)
"cde")
(string= (find #\c '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0))
:test #'char>)
"abc")
(string= (find #\c '("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0))
:test #'char>)
"bcd")
(eq (find 'a #(a b c)) 'a)
(eq (find 'b #(a b c)) 'b)
(eq (find 'c #(a b c)) 'c)
(null (find 'x #(a b c)))
(null (find 'a #(a b c) :start 1))
(null (find 'b #(a b c) :start 2))
(null (find 'c #(a b c) :start 3))
(null (find 'a #(a b c) :start 0 :end 0))
(null (find 'a #(a b c) :start 0 :end 0 :from-end t))
(null (find 'a #(a b c) :start 1 :end 1))
(null (find 'a #(a b c) :start 1 :end 1 :from-end t))
(null (find 'a #(a b c) :start 2 :end 2))
(null (find 'a #(a b c) :start 2 :end 2 :from-end t))
(null (find 'a #(a b c) :start 3 :end 3))
(null (find 'a #(a b c) :start 3 :end 3 :from-end t))
(eq (find 'a #(a b c) :end nil) 'a)
(eq (find 'b #(a b c) :end nil) 'b)
(eq (find 'c #(a b c) :end nil) 'c)
(eq (find 'a #(a b c) :end 1) 'a)
(eq (find 'b #(a b c) :end 2) 'b)
(eq (find 'c #(a b c) :end 3) 'c)
(null (find 'a #(a b c) :end 0))
(null (find 'b #(a b c) :end 1))
(null (find 'c #(a b c) :end 2))
(null (find 'a #((a) (b) (c))))
(equal (find 'a #((a) (b) (c)) :key #'car) '(a))
(equal (find 'b #((a) (b) (c)) :key #'car) '(b))
(equal (find 'c #((a) (b) (c)) :key #'car) '(c))
(null (find 'z #((a) (b) (c)) :key #'car))
(let ((vector #((a) (b) (c))))
(and (eq (find 'a vector :key #'car) (aref vector 0))
(eq (find 'b vector :key #'car) (aref vector 1))
(eq (find 'c vector :key #'car) (aref vector 2))
(null (find 'z vector :key #'car))))
(null (find '(a) #((a) (b) (c))))
(equal (find '(a) #((a) (b) (c)) :test #'equal) '(a))
(null (find '("a") #(("a") ("b") ("c"))))
(null (find '("a") #(("A") ("B") ("c")) :test #'equal))
(equal (find '("a") #(("A") ("B") ("c")) :test #'equalp) '("A"))
(eq (find 'nil #(first second third) :test (constantly t)) 'first)
(eql (find 3 #(0 1 2 3 4 5)) 3)
(eql (find 3 #(0 1 2 3 4 5) :test #'<) 4)
(eql (find 3 #(0 1 2 3 4 5) :test #'>) 0)
(equal (find '(a) #((a) (b) (c)) :test-not (complement #'equal)) '(a))
(null (find '("a") #(("A") ("B") ("c")) :test-not (complement #'equal)))
(equal (find '("a") #(("A") ("B") ("c")) :test-not (complement #'equalp))
'("A"))
(eq (find 'nil #(first second third) :test-not (constantly nil)) 'first)
(eql (find 3 #(0 1 2 3 4 5) :test-not #'>=) 4)
(eql (find 3 #(0 1 2 3 4 5) :test-not #'<=) 0)
(equal (find 'a #((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(a))
(equal (find 'a #((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(a a))
(equal (find 'b #((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(b))
(equal (find 'b #((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(b b))
(equal (find 'c #((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(c))
(equal (find 'c #((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(c c))
(null (find 'z #((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (find 'z #((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(equal (find 'a #((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
'(a a a))
(equal (find 'a #((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
'(a a a))
(equal (find 'a #((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
'(a a))
(null (find 'a #((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (find #\c #("abc" "bcd" "cde")))
(string= (find #\c #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0))
:test #'char=)
"cde")
(string= (find #\c #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0))
:test #'char>)
"abc")
(string= (find #\c #("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0))
:test #'char>)
"bcd")
(null (find #\z "abcABC"))
(eql (find #\a "abcABC") #\a)
(eql (find #\A "abcABC") #\A)
(eql (find #\A "abcABC" :test #'char-equal) #\a)
(eql (find #\A "abcABC" :test #'char-equal :from-end t) #\A)
(eql (find #\a "abcABC" :test #'char-equal :from-end t) #\A)
(eql (find #\a "abcABC" :test #'char-equal :from-end t :end 4) #\A)
(eql (find #\a "abcABC" :test #'char-equal :from-end t :end 3) #\a)
(zerop (find 0 #*01))
(eql (find 1 #*01) 1)
(null (find 0 #*01 :start 1))
(null (find 1 #*01 :end 0))
(null (find 0 #*000001 :start 5))
(eq (find-if #'(lambda (x) (eq x 'a)) '(a b c)) 'a)
(eq (find-if #'(lambda (x) (eq x 'b)) '(a b c)) 'b)
(eq (find-if #'(lambda (x) (eq x 'c)) '(a b c)) 'c)
(null (find-if #'(lambda (arg) (eq arg 'x)) '(a b c)))
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :start 1))
(null (find-if #'(lambda (x) (eq x 'b)) '(a b c) :start 2))
(null (find-if #'(lambda (x) (eq x 'c)) '(a b c) :start 3))
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :start 0 :end 0))
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :start 0 :end 0 :from-end t))
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :start 1 :end 1))
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :start 1 :end 1 :from-end t))
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :start 2 :end 2))
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :start 2 :end 2 :from-end t))
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :start 3 :end 3))
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :start 3 :end 3 :from-end t))
(eq (find-if #'(lambda (x) (eq x 'a)) '(a b c) :end nil) 'a)
(eq (find-if #'(lambda (x) (eq x 'b)) '(a b c) :end nil) 'b)
(eq (find-if #'(lambda (x) (eq x 'c)) '(a b c) :end nil) 'c)
(eq (find-if #'(lambda (x) (eq x 'a)) '(a b c) :end 1) 'a)
(eq (find-if #'(lambda (x) (eq x 'b)) '(a b c) :end 2) 'b)
(eq (find-if #'(lambda (x) (eq x 'c)) '(a b c) :end 3) 'c)
(null (find-if #'(lambda (x) (eq x 'a)) '(a b c) :end 0))
(null (find-if #'(lambda (x) (eq x 'b)) '(a b c) :end 1))
(null (find-if #'(lambda (x) (eq x 'c)) '(a b c) :end 2))
(null (find-if #'(lambda (x) (eq x 'a)) '((a) (b) (c))))
(equal (find-if #'(lambda (x) (eq x 'a)) '((a) (b) (c)) :key #'car) '(a))
(equal (find-if #'(lambda (x) (eq x 'b)) '((a) (b) (c)) :key #'car) '(b))
(equal (find-if #'(lambda (x) (eq x 'c)) '((a) (b) (c)) :key #'car) '(c))
(null (find-if #'(lambda (x) (eq x 'z)) '((a) (b) (c)) :key #'car))
(let ((list '((a) (b) (c))))
(and (eq (find-if #'(lambda (x) (eq x 'a)) list :key #'car) (car list))
(eq (find-if #'(lambda (x) (eq x 'b)) list :key #'car) (cadr list))
(eq (find-if #'(lambda (x) (eq x 'c)) list :key #'car) (caddr list))
(null (find-if #'(lambda (x) (eq x 'z)) list :key #'car))))
(equal (find-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(a))
(equal (find-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(a a))
(equal (find-if #'(lambda (x) (eq x 'b))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(b))
(equal (find-if #'(lambda (x) (eq x 'b))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(b b))
(equal (find-if #'(lambda (x) (eq x 'c))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(c))
(equal (find-if #'(lambda (x) (eq x 'c))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(c c))
(null (find-if #'(lambda (x) (eq x 'z))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (find-if #'(lambda (x) (eq x 'z))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(equal (find-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
'(a a a))
(equal (find-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
'(a a a))
(equal (find-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
'(a a))
(null (find-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (find-if #'(lambda (x) (eql x #\c)) '("abc" "bcd" "cde")))
(string= (find-if #'(lambda (x) (eql x #\c)) '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
"cde")
(string= (find-if #'(lambda (x) (char> #\c x)) '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
"abc")
(string= (find-if #'(lambda (x) (char> #\c x)) '("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0)))
"bcd")
(eq (find-if #'(lambda (x) (eq x 'a)) #(a b c)) 'a)
(eq (find-if #'(lambda (x) (eq x 'b)) #(a b c)) 'b)
(eq (find-if #'(lambda (x) (eq x 'c)) #(a b c)) 'c)
(null (find-if #'(lambda (arg) (eq arg 'x)) #(a b c)))
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :start 1))
(null (find-if #'(lambda (x) (eq x 'b)) #(a b c) :start 2))
(null (find-if #'(lambda (x) (eq x 'c)) #(a b c) :start 3))
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :start 0 :end 0))
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :start 0 :end 0 :from-end t))
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :start 1 :end 1))
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :start 1 :end 1 :from-end t))
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :start 2 :end 2))
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :start 2 :end 2 :from-end t))
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :start 3 :end 3))
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :start 3 :end 3 :from-end t))
(eq (find-if #'(lambda (x) (eq x 'a)) #(a b c) :end nil) 'a)
(eq (find-if #'(lambda (x) (eq x 'b)) #(a b c) :end nil) 'b)
(eq (find-if #'(lambda (x) (eq x 'c)) #(a b c) :end nil) 'c)
(eq (find-if #'(lambda (x) (eq x 'a)) #(a b c) :end 1) 'a)
(eq (find-if #'(lambda (x) (eq x 'b)) #(a b c) :end 2) 'b)
(eq (find-if #'(lambda (x) (eq x 'c)) #(a b c) :end 3) 'c)
(null (find-if #'(lambda (x) (eq x 'a)) #(a b c) :end 0))
(null (find-if #'(lambda (x) (eq x 'b)) #(a b c) :end 1))
(null (find-if #'(lambda (x) (eq x 'c)) #(a b c) :end 2))
(null (find-if #'(lambda (x) (eq x 'a)) #((a) (b) (c))))
(equal (find-if #'(lambda (x) (eq x 'a)) #((a) (b) (c)) :key #'car) '(a))
(equal (find-if #'(lambda (x) (eq x 'b)) #((a) (b) (c)) :key #'car) '(b))
(equal (find-if #'(lambda (x) (eq x 'c)) #((a) (b) (c)) :key #'car) '(c))
(null (find-if #'(lambda (x) (eq x 'z)) #((a) (b) (c)) :key #'car))
(let ((vector #((a) (b) (c))))
(and (eq (find-if #'(lambda (x) (eq x 'a)) vector :key #'car) (aref vector 0))
(eq (find-if #'(lambda (x) (eq x 'b)) vector :key #'car) (aref vector 1))
(eq (find-if #'(lambda (x) (eq x 'c)) vector :key #'car) (aref vector 2))
(null (find-if #'(lambda (x) (eq x 'z)) vector :key #'car))))
(equal (find-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(a))
(equal (find-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(a a))
(equal (find-if #'(lambda (x) (eq x 'b))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(b))
(equal (find-if #'(lambda (x) (eq x 'b))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(b b))
(equal (find-if #'(lambda (x) (eq x 'c))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(c))
(equal (find-if #'(lambda (x) (eq x 'c))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(c c))
(null (find-if #'(lambda (x) (eq x 'z))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (find-if #'(lambda (x) (eq x 'z))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(equal (find-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
'(a a a))
(equal (find-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
'(a a a))
(equal (find-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
'(a a))
(null (find-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (find-if #'(lambda (x) (eql x #\c)) #("abc" "bcd" "cde")))
(string= (find-if #'(lambda (x) (eql x #\c)) #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
"cde")
(string= (find-if #'(lambda (x) (char> #\c x)) #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
"abc")
(string= (find-if #'(lambda (x) (char> #\c x)) #("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0)))
"bcd")
(eq (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)) 'a)
(eq (find-if-not #'(lambda (x) (not (eq x 'b))) '(a b c)) 'b)
(eq (find-if-not #'(lambda (x) (not (eq x 'c))) '(a b c)) 'c)
(null (find-if-not #'(lambda (arg) (not (eq arg 'x))) '(a b c)))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 1))
(null (find-if-not #'(lambda (x) (not (eq x 'b))) '(a b c) :start 2))
(null (find-if-not #'(lambda (x) (not (eq x 'c))) '(a b c) :start 3))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 0 :end 0))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)
:start 0 :end 0 :from-end t))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 1 :end 1))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)
:start 1 :end 1 :from-end t))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 2 :end 2))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)
:start 2 :end 2 :from-end t))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 3 :end 3))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)
:start 3 :end 3 :from-end t))
(eq (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :end nil) 'a)
(eq (find-if-not #'(lambda (x) (not (eq x 'b))) '(a b c) :end nil) 'b)
(eq (find-if-not #'(lambda (x) (not (eq x 'c))) '(a b c) :end nil) 'c)
(eq (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :end 1) 'a)
(eq (find-if-not #'(lambda (x) (not (eq x 'b))) '(a b c) :end 2) 'b)
(eq (find-if-not #'(lambda (x) (not (eq x 'c))) '(a b c) :end 3) 'c)
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :end 0))
(null (find-if-not #'(lambda (x) (not (eq x 'b))) '(a b c) :end 1))
(null (find-if-not #'(lambda (x) (not (eq x 'c))) '(a b c) :end 2))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) '((a) (b) (c))))
(equal (find-if-not #'(lambda (x) (not (eq x 'a))) '((a) (b) (c)) :key #'car)
'(a))
(equal (find-if-not #'(lambda (x) (not (eq x 'b))) '((a) (b) (c)) :key #'car)
'(b))
(equal (find-if-not #'(lambda (x) (not (eq x 'c))) '((a) (b) (c)) :key #'car)
'(c))
(null (find-if-not #'(lambda (x) (not (eq x 'z))) '((a) (b) (c)) :key #'car))
(let ((list '((a) (b) (c))))
(and (eq (find-if-not #'(lambda (x) (not (eq x 'a))) list :key #'car)
(car list))
(eq (find-if-not #'(lambda (x) (not (eq x 'b))) list :key #'car)
(cadr list))
(eq (find-if-not #'(lambda (x) (not (eq x 'c))) list :key #'car)
(caddr list))
(null (find-if-not #'(lambda (x) (not (eq x 'z))) list :key #'car))))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(a))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(a a))
(equal (find-if-not #'(lambda (x) (not (eq x 'b)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(b))
(equal (find-if-not #'(lambda (x) (not (eq x 'b)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(b b))
(equal (find-if-not #'(lambda (x) (not (eq x 'c)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(c))
(equal (find-if-not #'(lambda (x) (not (eq x 'c)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(c c))
(null (find-if-not #'(lambda (x) (not (eq x 'z)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (find-if-not #'(lambda (x) (not (eq x 'z)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
'(a a a))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
'(a a a))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
'(a a))
(null (find-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (find-if-not #'(lambda (x) (not (eql x #\c))) '("abc" "bcd" "cde")))
(string= (find-if-not #'(lambda (x) (not (eql x #\c))) '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
"cde")
(string= (find-if-not #'(lambda (x) (not (char> #\c x))) '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
"abc")
(string= (find-if-not #'(lambda (x) (not (char> #\c x))) '("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0)))
"bcd")
(eq (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c)) 'a)
(eq (find-if-not #'(lambda (x) (not (eq x 'b))) #(a b c)) 'b)
(eq (find-if-not #'(lambda (x) (not (eq x 'c))) #(a b c)) 'c)
(null (find-if-not #'(lambda (arg) (not (eq arg 'x))) #(a b c)))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 1))
(null (find-if-not #'(lambda (x) (not (eq x 'b))) #(a b c) :start 2))
(null (find-if-not #'(lambda (x) (not (eq x 'c))) #(a b c) :start 3))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 0 :end 0))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 0 :end 0
:from-end t))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 1 :end 1))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 1 :end 1
:from-end t))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 2 :end 2))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 2 :end 2
:from-end t))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 3 :end 3))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 3 :end 3
:from-end t))
(eq (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :end nil) 'a)
(eq (find-if-not #'(lambda (x) (not (eq x 'b))) #(a b c) :end nil) 'b)
(eq (find-if-not #'(lambda (x) (not (eq x 'c))) #(a b c) :end nil) 'c)
(eq (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :end 1) 'a)
(eq (find-if-not #'(lambda (x) (not (eq x 'b))) #(a b c) :end 2) 'b)
(eq (find-if-not #'(lambda (x) (not (eq x 'c))) #(a b c) :end 3) 'c)
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :end 0))
(null (find-if-not #'(lambda (x) (not (eq x 'b))) #(a b c) :end 1))
(null (find-if-not #'(lambda (x) (not (eq x 'c))) #(a b c) :end 2))
(null (find-if-not #'(lambda (x) (not (eq x 'a))) #((a) (b) (c))))
(equal (find-if-not #'(lambda (x) (not (eq x 'a))) #((a) (b) (c)) :key #'car)
'(a))
(equal (find-if-not #'(lambda (x) (not (eq x 'b))) #((a) (b) (c)) :key #'car)
'(b))
(equal (find-if-not #'(lambda (x) (not (eq x 'c))) #((a) (b) (c)) :key #'car)
'(c))
(null (find-if-not #'(lambda (x) (not (eq x 'z))) #((a) (b) (c)) :key #'car))
(let ((vector #((a) (b) (c))))
(and (eq (find-if-not #'(lambda (x) (not (eq x 'a))) vector :key #'car)
(aref vector 0))
(eq (find-if-not #'(lambda (x) (not (eq x 'b))) vector :key #'car)
(aref vector 1))
(eq (find-if-not #'(lambda (x) (not (eq x 'c))) vector :key #'car)
(aref vector 2))
(null (find-if-not #'(lambda (x) (not (eq x 'z))) vector :key #'car))))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(a))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(a a))
(equal (find-if-not #'(lambda (x) (not (eq x 'b)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(b))
(equal (find-if-not #'(lambda (x) (not (eq x 'b)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(b b))
(equal (find-if-not #'(lambda (x) (not (eq x 'c)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
'(c))
(equal (find-if-not #'(lambda (x) (not (eq x 'c)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
'(c c))
(null (find-if-not #'(lambda (x) (not (eq x 'z)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (find-if-not #'(lambda (x) (not (eq x 'z)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
'(a a a))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
'(a a a))
(equal (find-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
'(a a))
(null (find-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(string= (find-if-not #'(lambda (x) (not (eql x #\c))) #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
"cde")
(string= (find-if-not #'(lambda (x) (not (char> #\c x))) #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
"abc")
(string= (find-if-not #'(lambda (x) (not (char> #\c x))) #("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0)))
"bcd")
(eql (position #\a "baobab" :from-end t) 4)
(eql (position-if #'oddp '((1) (2) (3) (4)) :start 1 :key #'car) 2)
(null (position 595 '()))
(eql (position-if-not #'integerp '(1 2 3 4 5.0)) 4)
(eql (position 'a '(a b c)) 0)
(eql (position 'b '(a b c)) 1)
(eql (position 'c '(a b c)) 2)
(null (position 'x '(a b c)))
(null (position 'a '(a b c) :start 1))
(null (position 'b '(a b c) :start 2))
(null (position 'c '(a b c) :start 3))
(null (position 'a '(a b c) :start 0 :end 0))
(null (position 'a '(a b c) :start 0 :end 0 :from-end t))
(null (position 'a '(a b c) :start 1 :end 1))
(null (position 'a '(a b c) :start 1 :end 1 :from-end t))
(null (position 'a '(a b c) :start 2 :end 2))
(null (position 'a '(a b c) :start 2 :end 2 :from-end t))
(null (position 'a '(a b c) :start 3 :end 3))
(null (position 'a '(a b c) :start 3 :end 3 :from-end t))
(eql (position 'a '(a b c) :end nil) '0)
(eql (position 'b '(a b c) :end nil) '1)
(eql (position 'c '(a b c) :end nil) '2)
(eql (position 'a '(a b c) :end 1) '0)
(eql (position 'b '(a b c) :end 2) '1)
(eql (position 'c '(a b c) :end 3) '2)
(null (position 'a '(a b c) :end 0))
(null (position 'b '(a b c) :end 1))
(null (position 'c '(a b c) :end 2))
(null (position 'a '((a) (b) (c))))
(eql (position 'a '((a) (b) (c)) :key #'car) 0)
(eql (position 'b '((a) (b) (c)) :key #'car) 1)
(eql (position 'c '((a) (b) (c)) :key #'car) 2)
(null (position 'z '((a) (b) (c)) :key #'car))
(null (position '(a) '((a) (b) (c))))
(eql (position '(a) '((a) (b) (c)) :test #'equal) 0)
(null (position '("a") '(("a") ("b") ("c"))))
(null (position '("a") '(("A") ("B") ("c")) :test #'equal))
(eql (position '("a") '(("A") ("B") ("c")) :test #'equalp) 0)
(eql (position 'nil '(first second third) :test (constantly t)) 0)
(eql (position 3 '(0 1 2 3 4 5)) 3)
(eql (position 3 '(0 1 2 3 4 5) :test #'<) 4)
(eql (position 3 '(0 1 2 3 4 5) :test #'>) 0)
(eql (position '(a) '((a) (b) (c)) :test-not (complement #'equal)) 0)
(null (position '("a") '(("A") ("B") ("c")) :test-not (complement #'equal)))
(eql (position '("a") '(("A") ("B") ("c")) :test-not (complement #'equalp))
0)
(eql (position 'nil '(first second third) :test-not (constantly nil)) 0)
(eql (position 3 '(0 1 2 3 4 5) :test-not #'>=) 4)
(eql (position 3 '(0 1 2 3 4 5) :test-not #'<=) 0)
(eql (position 'a '((a) (b) (c) (a a) (b b) (c c)) :key #'car) 0)
(eql (position 'a '((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t) 3)
(eql (position 'b '((a) (b) (c) (a a) (b b) (c c)) :key #'car) 1)
(eql (position 'b '((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t) 4)
(eql (position 'c '((a) (b) (c) (a a) (b b) (c c)) :key #'car) 2)
(eql (position 'c '((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t) 5)
(null (position 'z '((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (position 'z '((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(eql (position 'a '((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
6)
(eql (position 'a '((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
6)
(eql (position 'a '((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
3)
(null (position 'a '((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (position #\c '("abc" "bcd" "cde")))
(eql (position #\c '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0))
:test #'char=)
2)
(eql (position #\c '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0))
:test #'char>)
0)
(eql (position #\c '("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0))
:test #'char>)
1)
(eql (position 'a #(a b c)) 0)
(eql (position 'b #(a b c)) 1)
(eql (position 'c #(a b c)) 2)
(null (position 'x #(a b c)))
(null (position 'a #(a b c) :start 1))
(null (position 'b #(a b c) :start 2))
(null (position 'c #(a b c) :start 3))
(null (position 'a #(a b c) :start 0 :end 0))
(null (position 'a #(a b c) :start 0 :end 0 :from-end t))
(null (position 'a #(a b c) :start 1 :end 1))
(null (position 'a #(a b c) :start 1 :end 1 :from-end t))
(null (position 'a #(a b c) :start 2 :end 2))
(null (position 'a #(a b c) :start 2 :end 2 :from-end t))
(null (position 'a #(a b c) :start 3 :end 3))
(null (position 'a #(a b c) :start 3 :end 3 :from-end t))
(eql (position 'a #(a b c) :end nil) 0)
(eql (position 'b #(a b c) :end nil) 1)
(eql (position 'c #(a b c) :end nil) 2)
(eql (position 'a #(a b c) :end 1) 0)
(eql (position 'b #(a b c) :end 2) 1)
(eql (position 'c #(a b c) :end 3) 2)
(null (position 'a #(a b c) :end 0))
(null (position 'b #(a b c) :end 1))
(null (position 'c #(a b c) :end 2))
(null (position 'a #((a) (b) (c))))
(eql (position 'a #((a) (b) (c)) :key #'car) 0)
(eql (position 'b #((a) (b) (c)) :key #'car) 1)
(eql (position 'c #((a) (b) (c)) :key #'car) 2)
(null (position 'z #((a) (b) (c)) :key #'car))
(null (position '(a) #((a) (b) (c))))
(eql (position '(a) #((a) (b) (c)) :test #'equal) 0)
(null (position '("a") #(("a") ("b") ("c"))))
(null (position '("a") #(("A") ("B") ("c")) :test #'equal))
(eql (position '("a") #(("A") ("B") ("c")) :test #'equalp) 0)
(eql (position 'nil #(first second third) :test (constantly t)) 0)
(eql (position 'nil #(first second third) :test (constantly t) :from-end t) 2)
(eql (position 3 #(0 1 2 3 4 5)) 3)
(eql (position 3 #(0 1 2 3 4 5) :test #'<) 4)
(eql (position 3 #(0 1 2 3 4 5) :test #'>) 0)
(eql (position '(a) #((a) (b) (c)) :test-not (complement #'equal)) 0)
(null (position '("a") #(("A") ("B") ("c")) :test-not (complement #'equal)))
(eql (position '("a") #(("A") ("B") ("c")) :test-not (complement #'equalp))
0)
(eql (position 'nil #(first second third) :test-not (constantly nil)) 0)
(eql (position 3 #(0 1 2 3 4 5) :test-not #'>=) 4)
(eql (position 3 #(0 1 2 3 4 5) :test-not #'<=) 0)
(eql (position 'a #((a) (b) (c) (a a) (b b) (c c)) :key #'car) 0)
(eql (position 'a #((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t) 3)
(eql (position 'b #((a) (b) (c) (a a) (b b) (c c)) :key #'car) 1)
(eql (position 'b #((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t) 4)
(eql (position 'c #((a) (b) (c) (a a) (b b) (c c)) :key #'car) 2)
(eql (position 'c #((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t) 5)
(null (position 'z #((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (position 'z #((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(eql (position 'a #((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
6)
(eql (position 'a #((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
6)
(eql (position 'a #((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
3)
(null (position 'a #((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (position #\c #("abc" "bcd" "cde")))
(eql (position #\c #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0))
:test #'char=)
2)
(eql (position #\c #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0))
:test #'char>)
0)
(eql (position #\c #("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0))
:test #'char>)
1)
(null (position #\z "abcABC"))
(eql (position #\a "abcABC") 0)
(eql (position #\A "abcABC") 3)
(eql (position #\A "abcABC" :test #'char-equal) 0)
(eql (position #\A "abcABC" :test #'char-equal :from-end t) 3)
(eql (position #\a "abcABC" :test #'char-equal :from-end t) 3)
(eql (position #\a "abcABC" :test #'char-equal :from-end t :end 4) 3)
(eql (position #\a "abcABC" :test #'char-equal :from-end t :end 3) 0)
(zerop (position 0 #*01))
(eql (position 1 #*01) 1)
(null (position 0 #*01 :start 1))
(null (position 1 #*01 :end 0))
(null (position 0 #*000001 :start 5))
(eql (position-if #'(lambda (x) (eq x 'a)) '(a b c)) 0)
(eql (position-if #'(lambda (x) (eq x 'b)) '(a b c)) 1)
(eql (position-if #'(lambda (x) (eq x 'c)) '(a b c)) 2)
(null (position-if #'(lambda (arg) (eq arg 'x)) '(a b c)))
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :start 1))
(null (position-if #'(lambda (x) (eq x 'b)) '(a b c) :start 2))
(null (position-if #'(lambda (x) (eq x 'c)) '(a b c) :start 3))
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :start 0 :end 0))
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :start 0 :end 0
:from-end t))
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :start 1 :end 1))
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :start 1 :end 1
:from-end t))
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :start 2 :end 2))
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :start 2 :end 2
:from-end t))
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :start 3 :end 3))
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :start 3 :end 3
:from-end t))
(eql (position-if #'(lambda (x) (eq x 'a)) '(a b c) :end nil) 0)
(eql (position-if #'(lambda (x) (eq x 'b)) '(a b c) :end nil) 1)
(eql (position-if #'(lambda (x) (eq x 'c)) '(a b c) :end nil) 2)
(eql (position-if #'(lambda (x) (eq x 'a)) '(a b c) :end 1) 0)
(eql (position-if #'(lambda (x) (eq x 'b)) '(a b c) :end 2) 1)
(eql (position-if #'(lambda (x) (eq x 'c)) '(a b c) :end 3) 2)
(null (position-if #'(lambda (x) (eq x 'a)) '(a b c) :end 0))
(null (position-if #'(lambda (x) (eq x 'b)) '(a b c) :end 1))
(null (position-if #'(lambda (x) (eq x 'c)) '(a b c) :end 2))
(null (position-if #'(lambda (x) (eq x 'a)) '((a) (b) (c))))
(eql (position-if #'(lambda (x) (eq x 'a)) '((a) (b) (c)) :key #'car) 0)
(eql (position-if #'(lambda (x) (eq x 'b)) '((a) (b) (c)) :key #'car) 1)
(eql (position-if #'(lambda (x) (eq x 'c)) '((a) (b) (c)) :key #'car) 2)
(null (position-if #'(lambda (x) (eq x 'z)) '((a) (b) (c)) :key #'car))
(eql (position-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
0)
(eql (position-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
3)
(eql (position-if #'(lambda (x) (eq x 'b))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
1)
(eql (position-if #'(lambda (x) (eq x 'b))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
4)
(eql (position-if #'(lambda (x) (eq x 'c))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
2)
(eql (position-if #'(lambda (x) (eq x 'c))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
5)
(null (position-if #'(lambda (x) (eq x 'z))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (position-if #'(lambda (x) (eq x 'z))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(eql (position-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
6)
(eql (position-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
6)
(eql (position-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
3)
(null (position-if #'(lambda (x) (eq x 'a))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (position-if #'(lambda (x) (eql x #\c)) '("abc" "bcd" "cde")))
(eql (position-if #'(lambda (x) (eql x #\c)) '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
2)
(eql (position-if #'(lambda (x) (char> #\c x)) '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
0)
(eql (position-if #'(lambda (x) (char> #\c x)) '("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0)))
1)
(eql (position-if #'(lambda (x) (eq x 'a)) #(a b c)) 0)
(eql (position-if #'(lambda (x) (eq x 'b)) #(a b c)) 1)
(eql (position-if #'(lambda (x) (eq x 'c)) #(a b c)) 2)
(null (position-if #'(lambda (arg) (eq arg 'x)) #(a b c)))
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :start 1))
(null (position-if #'(lambda (x) (eq x 'b)) #(a b c) :start 2))
(null (position-if #'(lambda (x) (eq x 'c)) #(a b c) :start 3))
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :start 0 :end 0))
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :start 0 :end 0
:from-end t))
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :start 1 :end 1))
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :start 1 :end 1
:from-end t))
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :start 2 :end 2))
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :start 2 :end 2
:from-end t))
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :start 3 :end 3))
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :start 3 :end 3
:from-end t))
(eql (position-if #'(lambda (x) (eq x 'a)) #(a b c) :end nil) 0)
(eql (position-if #'(lambda (x) (eq x 'b)) #(a b c) :end nil) 1)
(eql (position-if #'(lambda (x) (eq x 'c)) #(a b c) :end nil) 2)
(eql (position-if #'(lambda (x) (eq x 'a)) #(a b c) :end 1) 0)
(eql (position-if #'(lambda (x) (eq x 'b)) #(a b c) :end 2) 1)
(eql (position-if #'(lambda (x) (eq x 'c)) #(a b c) :end 3) 2)
(null (position-if #'(lambda (x) (eq x 'a)) #(a b c) :end 0))
(null (position-if #'(lambda (x) (eq x 'b)) #(a b c) :end 1))
(null (position-if #'(lambda (x) (eq x 'c)) #(a b c) :end 2))
(null (position-if #'(lambda (x) (eq x 'a)) #((a) (b) (c))))
(eql (position-if #'(lambda (x) (eq x 'a)) #((a) (b) (c)) :key #'car) 0)
(eql (position-if #'(lambda (x) (eq x 'b)) #((a) (b) (c)) :key #'car) 1)
(eql (position-if #'(lambda (x) (eq x 'c)) #((a) (b) (c)) :key #'car) 2)
(null (position-if #'(lambda (x) (eq x 'z)) #((a) (b) (c)) :key #'car))
(eql (position-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
0)
(eql (position-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
3)
(eql (position-if #'(lambda (x) (eq x 'b))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
1)
(eql (position-if #'(lambda (x) (eq x 'b))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
4)
(eql (position-if #'(lambda (x) (eq x 'c))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
2)
(eql (position-if #'(lambda (x) (eq x 'c))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
5)
(null (position-if #'(lambda (x) (eq x 'z))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (position-if #'(lambda (x) (eq x 'z))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(eql (position-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
6)
(eql (position-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
6)
(eql (position-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
3)
(null (position-if #'(lambda (x) (eq x 'a))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (position-if #'(lambda (x) (eql x #\c)) #("abc" "bcd" "cde")))
(eql (position-if #'(lambda (x) (eql x #\c)) #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
2)
(eql (position-if #'(lambda (x) (char> #\c x)) #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
0)
(eql (position-if #'(lambda (x) (char> #\c x)) #("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0)))
1)
(eql (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)) 0)
(eql (position-if-not #'(lambda (x) (not (eq x 'b))) '(a b c)) 1)
(eql (position-if-not #'(lambda (x) (not (eq x 'c))) '(a b c)) 2)
(null (position-if-not #'(lambda (arg) (not (eq arg 'x))) '(a b c)))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 1))
(null (position-if-not #'(lambda (x) (not (eq x 'b))) '(a b c) :start 2))
(null (position-if-not #'(lambda (x) (not (eq x 'c))) '(a b c) :start 3))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 0 :end 0))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)
:start 0 :end 0 :from-end t))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 1 :end 1))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)
:start 1 :end 1 :from-end t))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 2 :end 2))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)
:start 2 :end 2 :from-end t))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :start 3 :end 3))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c)
:start 3 :end 3 :from-end t))
(eql (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :end nil) 0)
(eql (position-if-not #'(lambda (x) (not (eq x 'b))) '(a b c) :end nil) 1)
(eql (position-if-not #'(lambda (x) (not (eq x 'c))) '(a b c) :end nil) 2)
(eql (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :end 1) 0)
(eql (position-if-not #'(lambda (x) (not (eq x 'b))) '(a b c) :end 2) 1)
(eql (position-if-not #'(lambda (x) (not (eq x 'c))) '(a b c) :end 3) 2)
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '(a b c) :end 0))
(null (position-if-not #'(lambda (x) (not (eq x 'b))) '(a b c) :end 1))
(null (position-if-not #'(lambda (x) (not (eq x 'c))) '(a b c) :end 2))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) '((a) (b) (c))))
(eql (position-if-not #'(lambda (x) (not (eq x 'a))) '((a) (b) (c)) :key #'car)
0)
(eql (position-if-not #'(lambda (x) (not (eq x 'b))) '((a) (b) (c)) :key #'car)
1)
(eql (position-if-not #'(lambda (x) (not (eq x 'c))) '((a) (b) (c)) :key #'car)
2)
(null (position-if-not #'(lambda (x) (not (eq x 'z))) '((a) (b) (c))
:key #'car))
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
0)
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
3)
(eql (position-if-not #'(lambda (x) (not (eq x 'b)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
1)
(eql (position-if-not #'(lambda (x) (not (eq x 'b)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
4)
(eql (position-if-not #'(lambda (x) (not (eq x 'c)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car)
2)
(eql (position-if-not #'(lambda (x) (not (eq x 'c)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
5)
(null (position-if-not #'(lambda (x) (not (eq x 'z)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (position-if-not #'(lambda (x) (not (eq x 'z)))
'((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
6)
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
6)
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
3)
(null (position-if-not #'(lambda (x) (not (eq x 'a)))
'((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(null (position-if-not #'(lambda (x) (not (eql x #\c))) '("abc" "bcd" "cde")))
(eql (position-if-not #'(lambda (x) (not (eql x #\c))) '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
2)
(eql (position-if-not #'(lambda (x) (not (char> #\c x))) '("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
0)
(eql (position-if-not #'(lambda (x) (not (char> #\c x))) '("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0)))
1)
(eql (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c)) 0)
(eql (position-if-not #'(lambda (x) (not (eq x 'b))) #(a b c)) 1)
(eql (position-if-not #'(lambda (x) (not (eq x 'c))) #(a b c)) 2)
(null (position-if-not #'(lambda (arg) (not (eq arg 'x))) #(a b c)))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 1))
(null (position-if-not #'(lambda (x) (not (eq x 'b))) #(a b c) :start 2))
(null (position-if-not #'(lambda (x) (not (eq x 'c))) #(a b c) :start 3))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 0 :end 0))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 0 :end 0
:from-end t))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 1 :end 1))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 1 :end 1
:from-end t))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 2 :end 2))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 2 :end 2
:from-end t))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 3 :end 3))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :start 3 :end 3
:from-end t))
(eql (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :end nil) 0)
(eql (position-if-not #'(lambda (x) (not (eq x 'b))) #(a b c) :end nil) 1)
(eql (position-if-not #'(lambda (x) (not (eq x 'c))) #(a b c) :end nil) 2)
(eql (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :end 1) 0)
(eql (position-if-not #'(lambda (x) (not (eq x 'b))) #(a b c) :end 2) 1)
(eql (position-if-not #'(lambda (x) (not (eq x 'c))) #(a b c) :end 3) 2)
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #(a b c) :end 0))
(null (position-if-not #'(lambda (x) (not (eq x 'b))) #(a b c) :end 1))
(null (position-if-not #'(lambda (x) (not (eq x 'c))) #(a b c) :end 2))
(null (position-if-not #'(lambda (x) (not (eq x 'a))) #((a) (b) (c))))
(eql (position-if-not #'(lambda (x) (not (eq x 'a))) #((a) (b) (c)) :key #'car)
0)
(eql (position-if-not #'(lambda (x) (not (eq x 'b))) #((a) (b) (c)) :key #'car)
1)
(eql (position-if-not #'(lambda (x) (not (eq x 'c))) #((a) (b) (c)) :key #'car)
2)
(null (position-if-not #'(lambda (x) (not (eq x 'z))) #((a) (b) (c))
:key #'car))
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
0)
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
3)
(eql (position-if-not #'(lambda (x) (not (eq x 'b)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
1)
(eql (position-if-not #'(lambda (x) (not (eq x 'b)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
4)
(eql (position-if-not #'(lambda (x) (not (eq x 'c)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car)
2)
(eql (position-if-not #'(lambda (x) (not (eq x 'c)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t)
5)
(null (position-if-not #'(lambda (x) (not (eq x 'z)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car))
(null (position-if-not #'(lambda (x) (not (eq x 'z)))
#((a) (b) (c) (a a) (b b) (c c)) :key #'car :from-end t))
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t)
6)
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end nil)
6)
(eql (position-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:end 6)
3)
(null (position-if-not #'(lambda (x) (not (eq x 'a)))
#((a) (b) (c) (a a) (b b) (c c) (a a a))
:key #'car
:from-end t
:start 1
:end 3))
(eql (position-if-not #'(lambda (x) (not (eql x #\c))) #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
2)
(eql (position-if-not #'(lambda (x) (not (char> #\c x))) #("abc" "bcd" "cde")
:key #'(lambda (arg) (char arg 0)))
0)
(eql (position-if-not #'(lambda (x) (not (char> #\c x))) #("abc" "bcd" "cde")
:start 1
:key #'(lambda (arg) (char arg 0)))
1)
(eql (search "dog" "it's a dog's life") 7)
(eql (search '(0 1) '(2 4 6 1 3 5) :key #'oddp) 2)
(eql (search '() '()) 0)
(null (search '(a b c) '(x y z)))
(eql (search '() '(x y z)) 0)
(eql (search '(a) '(a)) 0)
(eql (search '(a b c) '(a b c x y z)) 0)
(eql (search '(a b c) '(x a b c y z)) 1)
(eql (search '(a b c) '(x y a b c z)) 2)
(eql (search '(a b c) '(x y z a b c)) 3)
(eql (search '(a b c) '(a b c a b c) :start2 1) 3)
(eql (search '(a b c) '(a b c a b c) :start2 1 :end2 nil) 3)
(eql (search '(a b c) '(a b c a b c) :start1 1 :start2 1 :end2 nil) 1)
(eql (search '(a b c) '(a b c a b c) :start1 1 :end1 nil :start2 1 :end2 nil) 1)
(null (search '(a b c) '(a b c a b c) :start2 0 :end2 0))
(null (search '(a b c) '(a b c a b c) :start2 1 :end2 1))
(null (search '(a b c) '(a b c a b c) :start2 2 :end2 2))
(null (search '(a b c) '(a b c a b c) :start2 3 :end2 3))
(null (search '(a b c) '(a b c a b c) :start2 4 :end2 4))
(null (search '(a b c) '(a b c a b c) :start2 5 :end2 5))
(null (search '(a b c) '(a b c a b c) :start2 6 :end2 6))
(eql (search '(a b c) '(a b c a b c)) 0)
(eql (search '(a b c) '(a b c a b c) :from-end t) 3)
(eql (search '(a b c) '(a b c a b c) :start2 3 :end2 6) 3)
(eql (search '(a b c) '(a b c a b c) :start2 3 :end2 6 :from-end t) 3)
(eql (search '(a b c) '(a b c a b c)
:start1 0 :end1 2 :start2 0 :end2 6)
0)
(eql (search '(a b c) '(a b c a b c)
:start1 0 :end1 2 :start2 0 :end2 6 :from-end t)
3)
(eql (search '(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 0 :end2 0) 0)
(eql (search '(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 0 :end2 0) 0)
(eql (search '(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 0 :end2 0) 0)
(eql (search '(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 0 :end2 0) 0)
(eql (search '(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 1 :end2 1) 1)
(eql (search '(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 1 :end2 1) 1)
(eql (search '(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 1 :end2 1) 1)
(eql (search '(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 1 :end2 1) 1)
(eql (search '(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 6 :end2 6) 6)
(eql (search '(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 6 :end2 6) 6)
(eql (search '(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 6 :end2 6) 6)
(eql (search '(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 6 :end2 6) 6)
(eql (search '(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 0 :end2 0
:from-end t) 0)
(eql (search '(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 0 :end2 0
:from-end t) 0)
(eql (search '(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 0 :end2 0
:from-end t) 0)
(eql (search '(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 0 :end2 0
:from-end t) 0)
(eql (search '(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 1 :end2 1
:from-end t) 1)
(eql (search '(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 1 :end2 1
:from-end t) 1)
(eql (search '(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 1 :end2 1
:from-end t) 1)
(eql (search '(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 1 :end2 1
:from-end t) 1)
(eql (search '(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 6 :end2 6
:from-end t) 6)
(eql (search '(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 6 :end2 6
:from-end t) 6)
(eql (search '(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 6 :end2 6
:from-end t) 6)
(eql (search '(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 6 :end2 6
:from-end t) 6)
(null (search '(#\a #\b #\c) '(#\A #\B #\C)))
(eql (search '(#\a #\b #\c) '(#\A #\B #\C) :test #'char-equal) 0)
(eql (search '(#\a #\b #\c) '(#\A #\B #\C) :test-not (complement #'char-equal))
0)
(eql (search '(#\a #\b) '(#\a #\b #\x #\y #\z)) 0)
(eql (search '(#\a #\b) '(#\a #\b #\x #\y #\z) :test #'char<) 1)
(eql (search '(#\a #\b) '(#\a #\b #\x #\y #\z) :test-not (complement #'char<))
1)
(eql (search '(#\a #\b) '(#\a #\b #\x #\y #\z)
:test-not (complement #'char<)
:from-end t)
3)
(null (search '((a) (b)) '((x) (y) (z) (a) (b) (c))))
(eql (search '((a) (b)) '((x) (y) (z) (a) (b) (c)) :key #'car) 3)
(eql (search '((a) (b)) '((a) (b) (c) (x) (y) (z) (a) (b) (c)) :key #'car)
0)
(eql (search '((a) (b)) '((a) (b) (c) (x) (y) (z) (a) (b) (c))
:key #'car
:from-end t)
6)
(eql (search '((a a) (b b)) '((a) (b) (c) (x) (y) (z) (a) (b) (c)) :key #'car)
0)
(eql (search '((a a) (b b))
'((a nil) (b t) (c nil) (x) (y) (z) (a 0) (b 1) (c 2))
:key #'car
:from-end t)
6)
(eql (search '(("a" a) ("b" b))
'(("a" nil) ("b" t) ("c" nil) ("x") ("y") ("z")
("A" 0) ("B" 1) ("C" 2))
:start1 1
:end1 2
:start2 3
:end2 nil
:key #'car
:test #'string-equal
:from-end t)
7)
(eql (search #() '()) 0)
(null (search #(a b c) '(x y z)))
(eql (search #() '(x y z)) 0)
(eql (search #(a) '(a)) 0)
(eql (search #(a b c) '(a b c x y z)) 0)
(eql (search #(a b c) '(x a b c y z)) 1)
(eql (search #(a b c) '(x y a b c z)) 2)
(eql (search #(a b c) '(x y z a b c)) 3)
(eql (search #(a b c) '(a b c a b c) :start2 1) 3)
(eql (search #(a b c) '(a b c a b c) :start2 1 :end2 nil) 3)
(eql (search #(a b c) '(a b c a b c) :start1 1 :start2 1 :end2 nil) 1)
(eql (search #(a b c) '(a b c a b c) :start1 1 :end1 nil :start2 1 :end2 nil) 1)
(null (search #(a b c) '(a b c a b c) :start2 0 :end2 0))
(null (search #(a b c) '(a b c a b c) :start2 1 :end2 1))
(null (search #(a b c) '(a b c a b c) :start2 2 :end2 2))
(null (search #(a b c) '(a b c a b c) :start2 3 :end2 3))
(null (search #(a b c) '(a b c a b c) :start2 4 :end2 4))
(null (search #(a b c) '(a b c a b c) :start2 5 :end2 5))
(null (search #(a b c) '(a b c a b c) :start2 6 :end2 6))
(eql (search #(a b c) '(a b c a b c)) 0)
(eql (search #(a b c) '(a b c a b c) :from-end t) 3)
(eql (search #(a b c) '(a b c a b c) :start2 3 :end2 6) 3)
(eql (search #(a b c) '(a b c a b c) :start2 3 :end2 6 :from-end t) 3)
(eql (search #(a b c) '(a b c a b c)
:start1 0 :end1 2 :start2 0 :end2 6)
0)
(eql (search #(a b c) '(a b c a b c)
:start1 0 :end1 2 :start2 0 :end2 6 :from-end t)
3)
(eql (search #(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 0 :end2 0) 0)
(eql (search #(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 0 :end2 0) 0)
(eql (search #(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 0 :end2 0) 0)
(eql (search #(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 0 :end2 0) 0)
(eql (search #(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 1 :end2 1) 1)
(eql (search #(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 1 :end2 1) 1)
(eql (search #(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 1 :end2 1) 1)
(eql (search #(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 1 :end2 1) 1)
(eql (search #(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 6 :end2 6) 6)
(eql (search #(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 6 :end2 6) 6)
(eql (search #(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 6 :end2 6) 6)
(eql (search #(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 6 :end2 6) 6)
(eql (search #(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 0 :end2 0
:from-end t) 0)
(eql (search #(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 0 :end2 0
:from-end t) 0)
(eql (search #(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 0 :end2 0
:from-end t) 0)
(eql (search #(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 0 :end2 0
:from-end t) 0)
(eql (search #(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 1 :end2 1
:from-end t) 1)
(eql (search #(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 1 :end2 1
:from-end t) 1)
(eql (search #(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 1 :end2 1
:from-end t) 1)
(eql (search #(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 1 :end2 1
:from-end t) 1)
(eql (search #(a b c) '(a b c a b c) :start1 0 :end1 0 :start2 6 :end2 6
:from-end t) 6)
(eql (search #(a b c) '(a b c a b c) :start1 1 :end1 1 :start2 6 :end2 6
:from-end t) 6)
(eql (search #(a b c) '(a b c a b c) :start1 2 :end1 2 :start2 6 :end2 6
:from-end t) 6)
(eql (search #(a b c) '(a b c a b c) :start1 3 :end1 3 :start2 6 :end2 6
:from-end t) 6)
(null (search #(#\a #\b #\c) '(#\A #\B #\C)))
(eql (search #(#\a #\b #\c) '(#\A #\B #\C) :test #'char-equal) 0)
(eql (search #(#\a #\b #\c) '(#\A #\B #\C) :test-not (complement #'char-equal))
0)
(eql (search #(#\a #\b) '(#\a #\b #\x #\y #\z)) 0)
(eql (search #(#\a #\b) '(#\a #\b #\x #\y #\z) :test #'char<) 1)
(eql (search #(#\a #\b) '(#\a #\b #\x #\y #\z) :test-not (complement #'char<))
1)
(eql (search #(#\a #\b) '(#\a #\b #\x #\y #\z)
:test-not (complement #'char<)
:from-end t)
3)
(null (search #((a) (b)) '((x) (y) (z) (a) (b) (c))))
(eql (search #((a) (b)) '((x) (y) (z) (a) (b) (c)) :key #'car) 3)
(eql (search #((a) (b)) '((a) (b) (c) (x) (y) (z) (a) (b) (c)) :key #'car)
0)
(eql (search #((a) (b)) '((a) (b) (c) (x) (y) (z) (a) (b) (c))
:key #'car
:from-end t)
6)
(eql (search #((a a) (b b)) '((a) (b) (c) (x) (y) (z) (a) (b) (c)) :key #'car)
0)
(eql (search #((a a) (b b))
'((a nil) (b t) (c nil) (x) (y) (z) (a 0) (b 1) (c 2))
:key #'car
:from-end t)
6)
(eql (search #(("a" a) ("b" b))
'(("a" nil) ("b" t) ("c" nil) ("x") ("y") ("z")
("A" 0) ("B" 1) ("C" 2))
:start1 1
:end1 2
:start2 3
:end2 nil
:key #'car
:test #'string-equal
:from-end t)
7)
(eql (search '() #()) 0)
(null (search '(a b c) #(x y z)))
(eql (search '() #(x y z)) 0)
(eql (search '(a) #(a)) 0)
(eql (search '(a b c) #(a b c x y z)) 0)
(eql (search '(a b c) #(x a b c y z)) 1)
(eql (search '(a b c) #(x y a b c z)) 2)
(eql (search '(a b c) #(x y z a b c)) 3)
(eql (search '(a b c) #(a b c a b c) :start2 1) 3)
(eql (search '(a b c) #(a b c a b c) :start2 1 :end2 nil) 3)
(eql (search '(a b c) #(a b c a b c) :start1 1 :start2 1 :end2 nil) 1)
(eql (search '(a b c) #(a b c a b c) :start1 1 :end1 nil :start2 1 :end2 nil) 1)
(null (search '(a b c) #(a b c a b c) :start2 0 :end2 0))
(null (search '(a b c) #(a b c a b c) :start2 1 :end2 1))
(null (search '(a b c) #(a b c a b c) :start2 2 :end2 2))
(null (search '(a b c) #(a b c a b c) :start2 3 :end2 3))
(null (search '(a b c) #(a b c a b c) :start2 4 :end2 4))
(null (search '(a b c) #(a b c a b c) :start2 5 :end2 5))
(null (search '(a b c) #(a b c a b c) :start2 6 :end2 6))
(eql (search '(a b c) #(a b c a b c)) 0)
(eql (search '(a b c) #(a b c a b c) :from-end t) 3)
(eql (search '(a b c) #(a b c a b c) :start2 3 :end2 6) 3)
(eql (search '(a b c) #(a b c a b c) :start2 3 :end2 6 :from-end t) 3)
(eql (search '(a b c) #(a b c a b c)
:start1 0 :end1 2 :start2 0 :end2 6)
0)
(eql (search '(a b c) #(a b c a b c)
:start1 0 :end1 2 :start2 0 :end2 6 :from-end t)
3)
(eql (search '(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 0 :end2 0) 0)
(eql (search '(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 0 :end2 0) 0)
(eql (search '(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 0 :end2 0) 0)
(eql (search '(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 0 :end2 0) 0)
(eql (search '(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 1 :end2 1) 1)
(eql (search '(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 1 :end2 1) 1)
(eql (search '(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 1 :end2 1) 1)
(eql (search '(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 1 :end2 1) 1)
(eql (search '(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 6 :end2 6) 6)
(eql (search '(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 6 :end2 6) 6)
(eql (search '(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 6 :end2 6) 6)
(eql (search '(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 6 :end2 6) 6)
(eql (search '(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 0 :end2 0
:from-end t) 0)
(eql (search '(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 0 :end2 0
:from-end t) 0)
(eql (search '(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 0 :end2 0
:from-end t) 0)
(eql (search '(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 0 :end2 0
:from-end t) 0)
(eql (search '(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 1 :end2 1
:from-end t) 1)
(eql (search '(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 1 :end2 1
:from-end t) 1)
(eql (search '(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 1 :end2 1
:from-end t) 1)
(eql (search '(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 1 :end2 1
:from-end t) 1)
(eql (search '(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 6 :end2 6
:from-end t) 6)
(eql (search '(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 6 :end2 6
:from-end t) 6)
(eql (search '(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 6 :end2 6
:from-end t) 6)
(eql (search '(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 6 :end2 6
:from-end t) 6)
(null (search '(#\a #\b #\c) #(#\A #\B #\C)))
(eql (search '(#\a #\b #\c) #(#\A #\B #\C) :test #'char-equal) 0)
(eql (search '(#\a #\b #\c) #(#\A #\B #\C) :test-not (complement #'char-equal))
0)
(eql (search '(#\a #\b) #(#\a #\b #\x #\y #\z)) 0)
(eql (search '(#\a #\b) #(#\a #\b #\x #\y #\z) :test #'char<) 1)
(eql (search '(#\a #\b) #(#\a #\b #\x #\y #\z) :test-not (complement #'char<))
1)
(eql (search '(#\a #\b) #(#\a #\b #\x #\y #\z)
:test-not (complement #'char<)
:from-end t)
3)
(null (search '((a) (b)) #((x) (y) (z) (a) (b) (c))))
(eql (search '((a) (b)) #((x) (y) (z) (a) (b) (c)) :key #'car) 3)
(eql (search '((a) (b)) #((a) (b) (c) (x) (y) (z) (a) (b) (c)) :key #'car)
0)
(eql (search '((a) (b)) #((a) (b) (c) (x) (y) (z) (a) (b) (c))
:key #'car
:from-end t)
6)
(eql (search '((a a) (b b)) #((a) (b) (c) (x) (y) (z) (a) (b) (c)) :key #'car)
0)
(eql (search '((a a) (b b))
#((a nil) (b t) (c nil) (x) (y) (z) (a 0) (b 1) (c 2))
:key #'car
:from-end t)
6)
(eql (search '(("a" a) ("b" b))
#(("a" nil) ("b" t) ("c" nil) ("x") ("y") ("z")
("A" 0) ("B" 1) ("C" 2))
:start1 1
:end1 2
:start2 3
:end2 nil
:key #'car
:test #'string-equal
:from-end t)
7)
(eql (search #() #()) 0)
(null (search #(a b c) #(x y z)))
(eql (search #() #(x y z)) 0)
(eql (search #(a) #(a)) 0)
(eql (search #(a b c) #(a b c x y z)) 0)
(eql (search #(a b c) #(x a b c y z)) 1)
(eql (search #(a b c) #(x y a b c z)) 2)
(eql (search #(a b c) #(x y z a b c)) 3)
(eql (search #(a b c) #(a b c a b c) :start2 1) 3)
(eql (search #(a b c) #(a b c a b c) :start2 1 :end2 nil) 3)
(eql (search #(a b c) #(a b c a b c) :start1 1 :start2 1 :end2 nil) 1)
(eql (search #(a b c) #(a b c a b c) :start1 1 :end1 nil :start2 1 :end2 nil) 1)
(null (search #(a b c) #(a b c a b c) :start2 0 :end2 0))
(null (search #(a b c) #(a b c a b c) :start2 1 :end2 1))
(null (search #(a b c) #(a b c a b c) :start2 2 :end2 2))
(null (search #(a b c) #(a b c a b c) :start2 3 :end2 3))
(null (search #(a b c) #(a b c a b c) :start2 4 :end2 4))
(null (search #(a b c) #(a b c a b c) :start2 5 :end2 5))
(null (search #(a b c) #(a b c a b c) :start2 6 :end2 6))
(eql (search #(a b c) #(a b c a b c)) 0)
(eql (search #(a b c) #(a b c a b c) :from-end t) 3)
(eql (search #(a b c) #(a b c a b c) :start2 3 :end2 6) 3)
(eql (search #(a b c) #(a b c a b c) :start2 3 :end2 6 :from-end t) 3)
(eql (search #(a b c) #(a b c a b c)
:start1 0 :end1 2 :start2 0 :end2 6)
0)
(eql (search #(a b c) #(a b c a b c)
:start1 0 :end1 2 :start2 0 :end2 6 :from-end t)
3)
(eql (search #(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 0 :end2 0) 0)
(eql (search #(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 0 :end2 0) 0)
(eql (search #(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 0 :end2 0) 0)
(eql (search #(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 0 :end2 0) 0)
(eql (search #(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 1 :end2 1) 1)
(eql (search #(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 1 :end2 1) 1)
(eql (search #(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 1 :end2 1) 1)
(eql (search #(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 1 :end2 1) 1)
(eql (search #(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 6 :end2 6) 6)
(eql (search #(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 6 :end2 6) 6)
(eql (search #(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 6 :end2 6) 6)
(eql (search #(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 6 :end2 6) 6)
(eql (search #(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 0 :end2 0
:from-end t) 0)
(eql (search #(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 0 :end2 0
:from-end t) 0)
(eql (search #(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 0 :end2 0
:from-end t) 0)
(eql (search #(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 0 :end2 0
:from-end t) 0)
(eql (search #(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 1 :end2 1
:from-end t) 1)
(eql (search #(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 1 :end2 1
:from-end t) 1)
(eql (search #(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 1 :end2 1
:from-end t) 1)
(eql (search #(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 1 :end2 1
:from-end t) 1)
(eql (search #(a b c) #(a b c a b c) :start1 0 :end1 0 :start2 6 :end2 6
:from-end t) 6)
(eql (search #(a b c) #(a b c a b c) :start1 1 :end1 1 :start2 6 :end2 6
:from-end t) 6)
(eql (search #(a b c) #(a b c a b c) :start1 2 :end1 2 :start2 6 :end2 6
:from-end t) 6)
(eql (search #(a b c) #(a b c a b c) :start1 3 :end1 3 :start2 6 :end2 6
:from-end t) 6)
(null (search #(#\a #\b #\c) #(#\A #\B #\C)))
(eql (search #(#\a #\b #\c) #(#\A #\B #\C) :test #'char-equal) 0)
(eql (search #(#\a #\b #\c) #(#\A #\B #\C) :test-not (complement #'char-equal))
0)
(eql (search #(#\a #\b) #(#\a #\b #\x #\y #\z)) 0)
(eql (search #(#\a #\b) #(#\a #\b #\x #\y #\z) :test #'char<) 1)
(eql (search #(#\a #\b) #(#\a #\b #\x #\y #\z) :test-not (complement #'char<))
1)
(eql (search #(#\a #\b) #(#\a #\b #\x #\y #\z)
:test-not (complement #'char<)
:from-end t)
3)
(null (search #((a) (b)) #((x) (y) (z) (a) (b) (c))))
(eql (search #((a) (b)) #((x) (y) (z) (a) (b) (c)) :key #'car) 3)
(eql (search #((a) (b)) #((a) (b) (c) (x) (y) (z) (a) (b) (c)) :key #'car)
0)
(eql (search #((a) (b)) #((a) (b) (c) (x) (y) (z) (a) (b) (c))
:key #'car
:from-end t)
6)
(eql (search #((a a) (b b)) #((a) (b) (c) (x) (y) (z) (a) (b) (c)) :key #'car)
0)
(eql (search #((a a) (b b))
#((a nil) (b t) (c nil) (x) (y) (z) (a 0) (b 1) (c 2))
:key #'car
:from-end t)
6)
(eql (search #(("a" a) ("b" b))
#(("a" nil) ("b" t) ("c" nil) ("x") ("y") ("z")
("A" 0) ("B" 1) ("C" 2))
:start1 1
:end1 2
:start2 3
:end2 nil
:key #'car
:test #'string-equal
:from-end t)
7)
(null (search "peace" "LOVE&PEACE"))
(eql (search "peace" "LOVE&PEACE" :test #'char-equal) 5)
(eql (search (concatenate 'simple-vector "peace")
(concatenate 'list "LOVE&PEACE") :test #'char-equal)
5)
(eql (search (concatenate 'list "peace")
(concatenate 'vector "LOVE&PEACE") :test #'char-equal)
5)
(eql (search (concatenate 'vector "peace")
(concatenate 'vector "LOVE&PEACE") :test #'char-equal)
5)
(eql (search #*10 #*010101) 1)
(eql (search #*10 #*010101 :from-end t) 3)
(null (search "PeAcE" "LoVe&pEaCe"))
(eql (search "PeAcE" "LoVe&pEaCe" :key #'char-upcase) 5)
(eql (search "abc" "abc xyz abc" :from-end t) 8)
(eql (search "abc" "abc xyz abc xyz abc xyz abc"
:start2 8
:end2 19)
8)
(eql (search "abc" "abc xyz abc xyz abc xyz abc"
:from-end t
:start2 8
:end2 19)
16)
(eql (mismatch "abcd" "ABCDE" :test #'char-equal) 4)
(eql (mismatch '(3 2 1 1 2 3) '(1 2 3) :from-end t) 3)
(null (mismatch '(1 2 3) '(2 3 4) :test-not #'eq :key #'oddp))
(null (mismatch '(1 2 3 4 5 6) '(3 4 5 6 7) :start1 2 :end2 4))
(null (mismatch '() '()))
(eql (mismatch '(a b c) '(x y z)) 0)
(eql (mismatch '() '(x y z)) 0)
(eql (mismatch '(x y z) '()) 0)
(null (mismatch '(a) '(a)))
(eql (mismatch '(a b c x y z) '(a b c)) 3)
(null (mismatch '(a b c) '(a b c)))
(eql (mismatch '(a b c d e f) '(a b c)) 3)
(eql (mismatch '(a b c) '(a b c d e f)) 3)
(eql (mismatch '(a b c) '(a b x)) 2)
(eql (mismatch '(a b c) '(a x c)) 1)
(eql (mismatch '(a b c) '(x b c)) 0)
(eql (mismatch '(x y z a b c x y z) '(a b c) :start1 3) 6)
(eql (mismatch '(x y z a b c x y z) '(a b c) :start1 3 :end1 nil) 6)
(eql (mismatch '(x y z a b c x y z) '(a b c) :start1 3 :end1 4) 4)
(eql (mismatch '(x y z a b c x y z) '(a b c) :start1 3 :end1 3) 3)
(null (mismatch '(x y z) '() :start1 0 :end1 0))
(null (mismatch '(x y z) '() :start1 1 :end1 1))
(null (mismatch '(x y z) '() :start1 2 :end1 2))
(null (mismatch '(x y z) '() :start1 3 :end1 3))
(null (mismatch '(x y z) '() :start1 0 :end1 0 :start2 0 :end2 0))
(null (mismatch '(x y z) '() :start1 1 :end1 1 :start2 1 :end2 1))
(null (mismatch '(x y z) '() :start1 2 :end1 2 :start2 2 :end2 2))
(null (mismatch '(x y z) '() :start1 3 :end1 3 :start2 3 :end2 3))
(null (mismatch '(x y z) '() :start1 0 :end1 0 :start2 3 :end2 3))
(null (mismatch '(x y z) '() :start1 1 :end1 1 :start2 2 :end2 2))
(null (mismatch '(x y z) '() :start1 2 :end1 2 :start2 1 :end2 1))
(null (mismatch '(x y z) '() :start1 3 :end1 3 :start2 0 :end2 0))
(eql (mismatch '(x y z) '(a b c) :start1 0 :end1 0) 0)
(eql (mismatch '(x y z) '(a b c) :start1 1 :end1 1) 1)
(eql (mismatch '(x y z) '(a b c) :start1 2 :end1 2) 2)
(eql (mismatch '(x y z) '(a b c) :start1 3 :end1 3) 3)
(eql (mismatch '(x y z) '(x y z) :start1 0 :end1 1) 1)
(eql (mismatch '(x y z) '(x y z) :start1 0 :end1 2) 2)
(eql (mismatch '(x y z) '(x y z Z) :start1 0 :end1 3) 3)
(null (mismatch '(x y z) '(x y z) :start1 0 :end1 3))
(eql (mismatch '(a b c x y z) '(x y z a b c)) 0)
(eql (mismatch '(a b c x y z) '(x y z a b c) :start1 3) 6)
(eql (mismatch '(a b c x y z a b c) '(x y z a b c x y z) :start1 3) 9)
(eql (mismatch '(a b c x y z a b c) '(x y z a b c x y z) :start1 6) 6)
(eql (mismatch '(a b c x y z a b c) '(x y z a b c x y z) :start1 6 :start2 3)
9)
(eql (mismatch '(a b c x y z a b c) '(x y z a b c x y z) :start1 0 :start2 3)
6)
(eql (mismatch '(a b c) '(a b c x y z)) 3)
(eql (mismatch '(a b c) '(x a b c y z)) 0)
(eql (mismatch '(a b c) '(x a b c y z) :start2 1) 3)
(eql (mismatch '(a b c) '(x a b c y z) :start2 1 :end2 nil) 3)
(null (mismatch '(a b c) '(x a b c y z) :start2 1 :end2 4))
(eql (mismatch '(a b c d e) '(c d)) 0)
(eql (mismatch '(a b c d e) '(c d) :start1 2) 4)
(eql (mismatch '(a b c d e) '(c d) :start1 2 :end1 3) 3)
(eql (mismatch '(a b c d e) '(c d) :start1 2 :start2 1) 2)
(eql (mismatch '(a b c d e) '(c d) :start1 3 :start2 1) 4)
(eql (mismatch '(a b c d e) '(c d) :start1 2 :end2 1) 3)
(null (mismatch '(a b c d) '(a b c d) :start1 1 :end1 2 :start2 1 :end2 2))
(null (mismatch '(a b c d) '(a b c d) :start1 1 :end1 3 :start2 1 :end2 3))
(null (mismatch '(a b c d) '(a b c d) :start1 1 :end1 4 :start2 1 :end2 4))
(eql (mismatch '(a b c d) '(a b c d) :start1 1 :end1 nil :start2 1 :end2 1) 1)
(eql (mismatch '(a b c d) '(a b c d) :start1 1 :end1 nil :start2 1 :end2 2) 2)
(eql (mismatch '(a b c d) '(a b c d) :start1 1 :end1 nil :start2 1 :end2 3) 3)
(null (mismatch '(a b c d) '(a b c d) :start1 1 :end1 nil :start2 1 :end2 4))
(eql (mismatch '(a b c d) '(a b c d) :start1 1 :end1 1 :start2 1) 1)
(eql (mismatch '(a b c d) '(a b c d) :start1 1 :end1 2 :start2 1) 2)
(eql (mismatch '(a b c d) '(a b c d) :start1 1 :end1 3 :start2 1) 3)
(null (mismatch '(a b c d) '(a b c d) :start1 1 :end1 4 :start2 1))
(null (mismatch '(a b c) '(a b c) :from-end t))
(eql (mismatch '(a b c d) '(a b c) :from-end t) 4)
(eql (mismatch '(a b c) '(c) :from-end t) 2)
(eql (mismatch '(a b c) '(z a b c) :from-end t) 0)
(eql (mismatch '(a b c) '(x y z a b c) :from-end t) 0)
(eql (mismatch '(x y z a b c) '(a b c) :from-end t) 3)
(eql (mismatch '(x y z a b c) '(a b c) :end1 3 :from-end t) 3)
(eql (mismatch '(x y z a b c) '(a b c) :end1 5 :from-end t) 5)
(eql (mismatch '(x y z a b c x y z) '(a b c) :end1 6 :from-end t) 3)
(eql (mismatch '(x y z a b c x y z) '(a b c) :start1 2 :end1 6 :from-end t) 3)
(eql (mismatch '(x y z a b c x y z) '(a b c)
:from-end t
:start1 2 :end1 5
:start2 1 :end2 2
) 4)
(eql (mismatch '(x y z a b c x y z) '(a b c)
:start1 2 :end1 5
:start2 1 :end2 2
) 2)
(eql (mismatch '((a) (b) (c)) '((a) (b) (c))) 0)
(null (mismatch '((a) (b) (c)) '((a) (b) (c)) :key #'car))
(null (mismatch '((a) (b) (c)) '((a) (b) (c)) :test #'equal))
(eql (mismatch '(#(a) #(b) #(c)) '(#(a) #(b) #(c))) 0)
(null (mismatch '(#(a) #(b) #(c)) '(#(a) #(b) #(c)) :test #'equalp))
(eql (mismatch '((a) (b) (c) (d)) '((a) (b) (c)) :key #'car) 3)
(eql (mismatch '((a) (b) (c)) '((a) (b) (c) (d)) :key #'car) 3)
(eql (mismatch '(#\a #\b #\c) '(#\A #\B #\C)) 0)
(null (mismatch '(#\a #\b #\c) '(#\A #\B #\C) :key #'char-upcase))
(null (mismatch '(#\a #\b #\c) '(#\A #\B #\C) :key #'char-downcase))
(null (mismatch '(#\a #\b #\c) '(#\A #\B #\C)
:key #'char-upcase
:start1 1 :end1 2
:start2 1 :end2 2))
(null (mismatch '(#\a #\b #\c) '(#\A #\B #\C)
:key #'char-upcase
:start1 2
:start2 2))
(eql (mismatch '((a b c) (b c d) (d e f))
'((b b c) (c c d) (e e f)))
0)
(eql (mismatch '((a b c) (b c d) (d e f))
'((b b c) (c c d) (e e f))
:key #'cdr)
0)
(null (mismatch '((a b c) (b c d) (d e f))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal))
(eql (mismatch '((a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal)
3)
(eql (mismatch '((a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t)
4)
(eql (mismatch '((a a a) (a b c) (b c d) (d e f))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t)
1)
(null (mismatch '((a a a) (a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:start1 1
:end1 4))
(eql (mismatch '((a a a) (a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:start1 1)
5)
(eql (mismatch '((a a a) (a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:end1 3
:start2 1
:end2 2)
2)
(null (mismatch #() '()))
(eql (mismatch #(a b c) '(x y z)) 0)
(eql (mismatch #() '(x y z)) 0)
(eql (mismatch #(x y z) '()) 0)
(null (mismatch #(a) '(a)))
(eql (mismatch #(a b c x y z) '(a b c)) 3)
(null (mismatch #(a b c) '(a b c)))
(eql (mismatch #(a b c d e f) '(a b c)) 3)
(eql (mismatch #(a b c) '(a b c d e f)) 3)
(eql (mismatch #(a b c) '(a b x)) 2)
(eql (mismatch #(a b c) '(a x c)) 1)
(eql (mismatch #(a b c) '(x b c)) 0)
(eql (mismatch #(x y z a b c x y z) '(a b c) :start1 3) 6)
(eql (mismatch #(x y z a b c x y z) '(a b c) :start1 3 :end1 nil) 6)
(eql (mismatch #(x y z a b c x y z) '(a b c) :start1 3 :end1 4) 4)
(eql (mismatch #(x y z a b c x y z) '(a b c) :start1 3 :end1 3) 3)
(null (mismatch #(x y z) '() :start1 0 :end1 0))
(null (mismatch #(x y z) '() :start1 1 :end1 1))
(null (mismatch #(x y z) '() :start1 2 :end1 2))
(null (mismatch #(x y z) '() :start1 3 :end1 3))
(null (mismatch #(x y z) '() :start1 0 :end1 0 :start2 0 :end2 0))
(null (mismatch #(x y z) '() :start1 1 :end1 1 :start2 1 :end2 1))
(null (mismatch #(x y z) '() :start1 2 :end1 2 :start2 2 :end2 2))
(null (mismatch #(x y z) '() :start1 3 :end1 3 :start2 3 :end2 3))
(null (mismatch #(x y z) '() :start1 0 :end1 0 :start2 3 :end2 3))
(null (mismatch #(x y z) '() :start1 1 :end1 1 :start2 2 :end2 2))
(null (mismatch #(x y z) '() :start1 2 :end1 2 :start2 1 :end2 1))
(null (mismatch #(x y z) '() :start1 3 :end1 3 :start2 0 :end2 0))
(eql (mismatch #(x y z) '(a b c) :start1 0 :end1 0) 0)
(eql (mismatch #(x y z) '(a b c) :start1 1 :end1 1) 1)
(eql (mismatch #(x y z) '(a b c) :start1 2 :end1 2) 2)
(eql (mismatch #(x y z) '(a b c) :start1 3 :end1 3) 3)
(eql (mismatch #(x y z) '(x y z) :start1 0 :end1 1) 1)
(eql (mismatch #(x y z) '(x y z) :start1 0 :end1 2) 2)
(eql (mismatch #(x y z) '(x y z Z) :start1 0 :end1 3) 3)
(null (mismatch #(x y z) '(x y z) :start1 0 :end1 3))
(eql (mismatch #(a b c x y z) '(x y z a b c)) 0)
(eql (mismatch #(a b c x y z) '(x y z a b c) :start1 3) 6)
(eql (mismatch #(a b c x y z a b c) '(x y z a b c x y z) :start1 3) 9)
(eql (mismatch #(a b c x y z a b c) '(x y z a b c x y z) :start1 6) 6)
(eql (mismatch #(a b c x y z a b c) '(x y z a b c x y z) :start1 6 :start2 3)
9)
(eql (mismatch #(a b c x y z a b c) '(x y z a b c x y z) :start1 0 :start2 3)
6)
(eql (mismatch #(a b c) '(a b c x y z)) 3)
(eql (mismatch #(a b c) '(x a b c y z)) 0)
(eql (mismatch #(a b c) '(x a b c y z) :start2 1) 3)
(eql (mismatch #(a b c) '(x a b c y z) :start2 1 :end2 nil) 3)
(null (mismatch #(a b c) '(x a b c y z) :start2 1 :end2 4))
(eql (mismatch #(a b c d e) '(c d)) 0)
(eql (mismatch #(a b c d e) '(c d) :start1 2) 4)
(eql (mismatch #(a b c d e) '(c d) :start1 2 :end1 3) 3)
(eql (mismatch #(a b c d e) '(c d) :start1 2 :start2 1) 2)
(eql (mismatch #(a b c d e) '(c d) :start1 3 :start2 1) 4)
(eql (mismatch #(a b c d e) '(c d) :start1 2 :end2 1) 3)
(null (mismatch #(a b c d) '(a b c d) :start1 1 :end1 2 :start2 1 :end2 2))
(null (mismatch #(a b c d) '(a b c d) :start1 1 :end1 3 :start2 1 :end2 3))
(null (mismatch #(a b c d) '(a b c d) :start1 1 :end1 4 :start2 1 :end2 4))
(eql (mismatch #(a b c d) '(a b c d) :start1 1 :end1 nil :start2 1 :end2 1) 1)
(eql (mismatch #(a b c d) '(a b c d) :start1 1 :end1 nil :start2 1 :end2 2) 2)
(eql (mismatch #(a b c d) '(a b c d) :start1 1 :end1 nil :start2 1 :end2 3) 3)
(null (mismatch #(a b c d) '(a b c d) :start1 1 :end1 nil :start2 1 :end2 4))
(eql (mismatch #(a b c d) '(a b c d) :start1 1 :end1 1 :start2 1) 1)
(eql (mismatch #(a b c d) '(a b c d) :start1 1 :end1 2 :start2 1) 2)
(eql (mismatch #(a b c d) '(a b c d) :start1 1 :end1 3 :start2 1) 3)
(null (mismatch #(a b c d) '(a b c d) :start1 1 :end1 4 :start2 1))
(null (mismatch #(a b c) '(a b c) :from-end t))
(eql (mismatch #(a b c d) '(a b c) :from-end t) 4)
(eql (mismatch #(a b c) '(c) :from-end t) 2)
(eql (mismatch #(a b c) '(z a b c) :from-end t) 0)
(eql (mismatch #(a b c) '(x y z a b c) :from-end t) 0)
(eql (mismatch #(x y z a b c) '(a b c) :from-end t) 3)
(eql (mismatch #(x y z a b c) '(a b c) :end1 3 :from-end t) 3)
(eql (mismatch #(x y z a b c) '(a b c) :end1 5 :from-end t) 5)
(eql (mismatch #(x y z a b c x y z) '(a b c) :end1 6 :from-end t) 3)
(eql (mismatch #(x y z a b c x y z) '(a b c) :start1 2 :end1 6 :from-end t) 3)
(eql (mismatch #(x y z a b c x y z) '(a b c)
:from-end t
:start1 2 :end1 5
:start2 1 :end2 2
) 4)
(eql (mismatch #(x y z a b c x y z) '(a b c)
:start1 2 :end1 5
:start2 1 :end2 2
) 2)
(eql (mismatch #((a) (b) (c)) '((a) (b) (c))) 0)
(null (mismatch #((a) (b) (c)) '((a) (b) (c)) :key #'car))
(null (mismatch #((a) (b) (c)) '((a) (b) (c)) :test #'equal))
(eql (mismatch #(#(a) #(b) #(c)) '(#(a) #(b) #(c))) 0)
(null (mismatch #(#(a) #(b) #(c)) '(#(a) #(b) #(c)) :test #'equalp))
(eql (mismatch #((a) (b) (c) (d)) '((a) (b) (c)) :key #'car) 3)
(eql (mismatch #((a) (b) (c)) '((a) (b) (c) (d)) :key #'car) 3)
(eql (mismatch #(#\a #\b #\c) '(#\A #\B #\C)) 0)
(null (mismatch #(#\a #\b #\c) '(#\A #\B #\C) :key #'char-upcase))
(null (mismatch #(#\a #\b #\c) '(#\A #\B #\C) :key #'char-downcase))
(null (mismatch #(#\a #\b #\c) '(#\A #\B #\C)
:key #'char-upcase
:start1 1 :end1 2
:start2 1 :end2 2))
(null (mismatch #(#\a #\b #\c) '(#\A #\B #\C)
:key #'char-upcase
:start1 2
:start2 2))
(eql (mismatch #((a b c) (b c d) (d e f))
'((b b c) (c c d) (e e f)))
0)
(eql (mismatch #((a b c) (b c d) (d e f))
'((b b c) (c c d) (e e f))
:key #'cdr)
0)
(null (mismatch #((a b c) (b c d) (d e f))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal))
(eql (mismatch #((a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal)
3)
(eql (mismatch #((a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t)
4)
(eql (mismatch #((a a a) (a b c) (b c d) (d e f))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t)
1)
(null (mismatch #((a a a) (a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:start1 1
:end1 4))
(eql (mismatch #((a a a) (a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:start1 1)
5)
(eql (mismatch #((a a a) (a b c) (b c d) (d e f) (e f g))
'((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:end1 3
:start2 1
:end2 2)
2)
(null (mismatch '() #()))
(eql (mismatch '(a b c) #(x y z)) 0)
(eql (mismatch '() #(x y z)) 0)
(eql (mismatch '(x y z) #()) 0)
(null (mismatch '(a) #(a)))
(eql (mismatch '(a b c x y z) #(a b c)) 3)
(null (mismatch '(a b c) #(a b c)))
(eql (mismatch '(a b c d e f) #(a b c)) 3)
(eql (mismatch '(a b c) #(a b c d e f)) 3)
(eql (mismatch '(a b c) #(a b x)) 2)
(eql (mismatch '(a b c) #(a x c)) 1)
(eql (mismatch '(a b c) #(x b c)) 0)
(eql (mismatch '(x y z a b c x y z) #(a b c) :start1 3) 6)
(eql (mismatch '(x y z a b c x y z) #(a b c) :start1 3 :end1 nil) 6)
(eql (mismatch '(x y z a b c x y z) #(a b c) :start1 3 :end1 4) 4)
(eql (mismatch '(x y z a b c x y z) #(a b c) :start1 3 :end1 3) 3)
(null (mismatch '(x y z) #() :start1 0 :end1 0))
(null (mismatch '(x y z) #() :start1 1 :end1 1))
(null (mismatch '(x y z) #() :start1 2 :end1 2))
(null (mismatch '(x y z) #() :start1 3 :end1 3))
(null (mismatch '(x y z) #() :start1 0 :end1 0 :start2 0 :end2 0))
(null (mismatch '(x y z) #() :start1 1 :end1 1 :start2 1 :end2 1))
(null (mismatch '(x y z) #() :start1 2 :end1 2 :start2 2 :end2 2))
(null (mismatch '(x y z) #() :start1 3 :end1 3 :start2 3 :end2 3))
(null (mismatch '(x y z) #() :start1 0 :end1 0 :start2 3 :end2 3))
(null (mismatch '(x y z) #() :start1 1 :end1 1 :start2 2 :end2 2))
(null (mismatch '(x y z) #() :start1 2 :end1 2 :start2 1 :end2 1))
(null (mismatch '(x y z) #() :start1 3 :end1 3 :start2 0 :end2 0))
(eql (mismatch '(x y z) #(a b c) :start1 0 :end1 0) 0)
(eql (mismatch '(x y z) #(a b c) :start1 1 :end1 1) 1)
(eql (mismatch '(x y z) #(a b c) :start1 2 :end1 2) 2)
(eql (mismatch '(x y z) #(a b c) :start1 3 :end1 3) 3)
(eql (mismatch '(x y z) #(x y z) :start1 0 :end1 1) 1)
(eql (mismatch '(x y z) #(x y z) :start1 0 :end1 2) 2)
(eql (mismatch '(x y z) #(x y z Z) :start1 0 :end1 3) 3)
(null (mismatch '(x y z) #(x y z) :start1 0 :end1 3))
(eql (mismatch '(a b c x y z) #(x y z a b c)) 0)
(eql (mismatch '(a b c x y z) #(x y z a b c) :start1 3) 6)
(eql (mismatch '(a b c x y z a b c) #(x y z a b c x y z) :start1 3) 9)
(eql (mismatch '(a b c x y z a b c) #(x y z a b c x y z) :start1 6) 6)
(eql (mismatch '(a b c x y z a b c) #(x y z a b c x y z) :start1 6 :start2 3)
9)
(eql (mismatch '(a b c x y z a b c) #(x y z a b c x y z) :start1 0 :start2 3)
6)
(eql (mismatch '(a b c) #(a b c x y z)) 3)
(eql (mismatch '(a b c) #(x a b c y z)) 0)
(eql (mismatch '(a b c) #(x a b c y z) :start2 1) 3)
(eql (mismatch '(a b c) #(x a b c y z) :start2 1 :end2 nil) 3)
(null (mismatch '(a b c) #(x a b c y z) :start2 1 :end2 4))
(eql (mismatch '(a b c d e) #(c d)) 0)
(eql (mismatch '(a b c d e) #(c d) :start1 2) 4)
(eql (mismatch '(a b c d e) #(c d) :start1 2 :end1 3) 3)
(eql (mismatch '(a b c d e) #(c d) :start1 2 :start2 1) 2)
(eql (mismatch '(a b c d e) #(c d) :start1 3 :start2 1) 4)
(eql (mismatch '(a b c d e) #(c d) :start1 2 :end2 1) 3)
(null (mismatch '(a b c d) #(a b c d) :start1 1 :end1 2 :start2 1 :end2 2))
(null (mismatch '(a b c d) #(a b c d) :start1 1 :end1 3 :start2 1 :end2 3))
(null (mismatch '(a b c d) #(a b c d) :start1 1 :end1 4 :start2 1 :end2 4))
(eql (mismatch '(a b c d) #(a b c d) :start1 1 :end1 nil :start2 1 :end2 1) 1)
(eql (mismatch '(a b c d) #(a b c d) :start1 1 :end1 nil :start2 1 :end2 2) 2)
(eql (mismatch '(a b c d) #(a b c d) :start1 1 :end1 nil :start2 1 :end2 3) 3)
(null (mismatch '(a b c d) #(a b c d) :start1 1 :end1 nil :start2 1 :end2 4))
(eql (mismatch '(a b c d) #(a b c d) :start1 1 :end1 1 :start2 1) 1)
(eql (mismatch '(a b c d) #(a b c d) :start1 1 :end1 2 :start2 1) 2)
(eql (mismatch '(a b c d) #(a b c d) :start1 1 :end1 3 :start2 1) 3)
(null (mismatch '(a b c d) #(a b c d) :start1 1 :end1 4 :start2 1))
(null (mismatch '(a b c) #(a b c) :from-end t))
(eql (mismatch '(a b c d) #(a b c) :from-end t) 4)
(eql (mismatch '(a b c) #(c) :from-end t) 2)
(eql (mismatch '(a b c) #(z a b c) :from-end t) 0)
(eql (mismatch '(a b c) #(x y z a b c) :from-end t) 0)
(eql (mismatch '(x y z a b c) #(a b c) :from-end t) 3)
(eql (mismatch '(x y z a b c) #(a b c) :end1 3 :from-end t) 3)
(eql (mismatch '(x y z a b c) #(a b c) :end1 5 :from-end t) 5)
(eql (mismatch '(x y z a b c x y z) #(a b c) :end1 6 :from-end t) 3)
(eql (mismatch '(x y z a b c x y z) #(a b c) :start1 2 :end1 6 :from-end t) 3)
(eql (mismatch '(x y z a b c x y z) #(a b c)
:from-end t
:start1 2 :end1 5
:start2 1 :end2 2
) 4)
(eql (mismatch '(x y z a b c x y z) #(a b c)
:start1 2 :end1 5
:start2 1 :end2 2
) 2)
(eql (mismatch '((a) (b) (c)) #((a) (b) (c))) 0)
(null (mismatch '((a) (b) (c)) #((a) (b) (c)) :key #'car))
(null (mismatch '((a) (b) (c)) #((a) (b) (c)) :test #'equal))
(eql (mismatch '(#(a) #(b) #(c)) #(#(a) #(b) #(c))) 0)
(null (mismatch '(#(a) #(b) #(c)) #(#(a) #(b) #(c)) :test #'equalp))
(eql (mismatch '((a) (b) (c) (d)) #((a) (b) (c)) :key #'car) 3)
(eql (mismatch '((a) (b) (c)) #((a) (b) (c) (d)) :key #'car) 3)
(eql (mismatch '(#\a #\b #\c) #(#\A #\B #\C)) 0)
(null (mismatch '(#\a #\b #\c) #(#\A #\B #\C) :key #'char-upcase))
(null (mismatch '(#\a #\b #\c) #(#\A #\B #\C) :key #'char-downcase))
(null (mismatch '(#\a #\b #\c) #(#\A #\B #\C)
:key #'char-upcase
:start1 1 :end1 2
:start2 1 :end2 2))
(null (mismatch '(#\a #\b #\c) #(#\A #\B #\C)
:key #'char-upcase
:start1 2
:start2 2))
(eql (mismatch '((a b c) (b c d) (d e f))
#((b b c) (c c d) (e e f)))
0)
(eql (mismatch '((a b c) (b c d) (d e f))
#((b b c) (c c d) (e e f))
:key #'cdr)
0)
(null (mismatch '((a b c) (b c d) (d e f))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal))
(eql (mismatch '((a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal)
3)
(eql (mismatch '((a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t)
4)
(eql (mismatch '((a a a) (a b c) (b c d) (d e f))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t)
1)
(null (mismatch '((a a a) (a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:start1 1
:end1 4))
(eql (mismatch '((a a a) (a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:start1 1)
5)
(eql (mismatch '((a a a) (a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:end1 3
:start2 1
:end2 2)
2)
(null (mismatch #() #()))
(eql (mismatch #(a b c) #(x y z)) 0)
(eql (mismatch #() #(x y z)) 0)
(eql (mismatch #(x y z) #()) 0)
(null (mismatch #(a) #(a)))
(eql (mismatch #(a b c x y z) #(a b c)) 3)
(null (mismatch #(a b c) #(a b c)))
(eql (mismatch #(a b c d e f) #(a b c)) 3)
(eql (mismatch #(a b c) #(a b c d e f)) 3)
(eql (mismatch #(a b c) #(a b x)) 2)
(eql (mismatch #(a b c) #(a x c)) 1)
(eql (mismatch #(a b c) #(x b c)) 0)
(eql (mismatch #(x y z a b c x y z) #(a b c) :start1 3) 6)
(eql (mismatch #(x y z a b c x y z) #(a b c) :start1 3 :end1 nil) 6)
(eql (mismatch #(x y z a b c x y z) #(a b c) :start1 3 :end1 4) 4)
(eql (mismatch #(x y z a b c x y z) #(a b c) :start1 3 :end1 3) 3)
(null (mismatch #(x y z) #() :start1 0 :end1 0))
(null (mismatch #(x y z) #() :start1 1 :end1 1))
(null (mismatch #(x y z) #() :start1 2 :end1 2))
(null (mismatch #(x y z) #() :start1 3 :end1 3))
(null (mismatch #(x y z) #() :start1 0 :end1 0 :start2 0 :end2 0))
(null (mismatch #(x y z) #() :start1 1 :end1 1 :start2 1 :end2 1))
(null (mismatch #(x y z) #() :start1 2 :end1 2 :start2 2 :end2 2))
(null (mismatch #(x y z) #() :start1 3 :end1 3 :start2 3 :end2 3))
(null (mismatch #(x y z) #() :start1 0 :end1 0 :start2 3 :end2 3))
(null (mismatch #(x y z) #() :start1 1 :end1 1 :start2 2 :end2 2))
(null (mismatch #(x y z) #() :start1 2 :end1 2 :start2 1 :end2 1))
(null (mismatch #(x y z) #() :start1 3 :end1 3 :start2 0 :end2 0))
(eql (mismatch #(x y z) #(a b c) :start1 0 :end1 0) 0)
(eql (mismatch #(x y z) #(a b c) :start1 1 :end1 1) 1)
(eql (mismatch #(x y z) #(a b c) :start1 2 :end1 2) 2)
(eql (mismatch #(x y z) #(a b c) :start1 3 :end1 3) 3)
(eql (mismatch #(x y z) #(x y z) :start1 0 :end1 1) 1)
(eql (mismatch #(x y z) #(x y z) :start1 0 :end1 2) 2)
(eql (mismatch #(x y z) #(x y z Z) :start1 0 :end1 3) 3)
(null (mismatch #(x y z) #(x y z) :start1 0 :end1 3))
(eql (mismatch #(a b c x y z) #(x y z a b c)) 0)
(eql (mismatch #(a b c x y z) #(x y z a b c) :start1 3) 6)
(eql (mismatch #(a b c x y z a b c) #(x y z a b c x y z) :start1 3) 9)
(eql (mismatch #(a b c x y z a b c) #(x y z a b c x y z) :start1 6) 6)
(eql (mismatch #(a b c x y z a b c) #(x y z a b c x y z) :start1 6 :start2 3)
9)
(eql (mismatch #(a b c x y z a b c) #(x y z a b c x y z) :start1 0 :start2 3)
6)
(eql (mismatch #(a b c) #(a b c x y z)) 3)
(eql (mismatch #(a b c) #(x a b c y z)) 0)
(eql (mismatch #(a b c) #(x a b c y z) :start2 1) 3)
(eql (mismatch #(a b c) #(x a b c y z) :start2 1 :end2 nil) 3)
(null (mismatch #(a b c) #(x a b c y z) :start2 1 :end2 4))
(eql (mismatch #(a b c d e) #(c d)) 0)
(eql (mismatch #(a b c d e) #(c d) :start1 2) 4)
(eql (mismatch #(a b c d e) #(c d) :start1 2 :end1 3) 3)
(eql (mismatch #(a b c d e) #(c d) :start1 2 :start2 1) 2)
(eql (mismatch #(a b c d e) #(c d) :start1 3 :start2 1) 4)
(eql (mismatch #(a b c d e) #(c d) :start1 2 :end2 1) 3)
(null (mismatch #(a b c d) #(a b c d) :start1 1 :end1 2 :start2 1 :end2 2))
(null (mismatch #(a b c d) #(a b c d) :start1 1 :end1 3 :start2 1 :end2 3))
(null (mismatch #(a b c d) #(a b c d) :start1 1 :end1 4 :start2 1 :end2 4))
(eql (mismatch #(a b c d) #(a b c d) :start1 1 :end1 nil :start2 1 :end2 1) 1)
(eql (mismatch #(a b c d) #(a b c d) :start1 1 :end1 nil :start2 1 :end2 2) 2)
(eql (mismatch #(a b c d) #(a b c d) :start1 1 :end1 nil :start2 1 :end2 3) 3)
(null (mismatch #(a b c d) #(a b c d) :start1 1 :end1 nil :start2 1 :end2 4))
(eql (mismatch #(a b c d) #(a b c d) :start1 1 :end1 1 :start2 1) 1)
(eql (mismatch #(a b c d) #(a b c d) :start1 1 :end1 2 :start2 1) 2)
(eql (mismatch #(a b c d) #(a b c d) :start1 1 :end1 3 :start2 1) 3)
(null (mismatch #(a b c d) #(a b c d) :start1 1 :end1 4 :start2 1))
(null (mismatch #(a b c) #(a b c) :from-end t))
(eql (mismatch #(a b c d) #(a b c) :from-end t) 4)
(eql (mismatch #(a b c) #(c) :from-end t) 2)
(eql (mismatch #(a b c) #(z a b c) :from-end t) 0)
(eql (mismatch #(a b c) #(x y z a b c) :from-end t) 0)
(eql (mismatch #(x y z a b c) #(a b c) :from-end t) 3)
(eql (mismatch #(x y z a b c) #(a b c) :end1 3 :from-end t) 3)
(eql (mismatch #(x y z a b c) #(a b c) :end1 5 :from-end t) 5)
(eql (mismatch #(x y z a b c x y z) #(a b c) :end1 6 :from-end t) 3)
(eql (mismatch #(x y z a b c x y z) #(a b c) :start1 2 :end1 6 :from-end t) 3)
(eql (mismatch #(x y z a b c x y z) #(a b c)
:from-end t
:start1 2 :end1 5
:start2 1 :end2 2
) 4)
(eql (mismatch #(x y z a b c x y z) #(a b c)
:start1 2 :end1 5
:start2 1 :end2 2
) 2)
(eql (mismatch #((a) (b) (c)) #((a) (b) (c))) 0)
(null (mismatch #((a) (b) (c)) #((a) (b) (c)) :key #'car))
(null (mismatch #((a) (b) (c)) #((a) (b) (c)) :test #'equal))
(eql (mismatch #(#(a) #(b) #(c)) #(#(a) #(b) #(c))) 0)
(null (mismatch #(#(a) #(b) #(c)) #(#(a) #(b) #(c)) :test #'equalp))
(eql (mismatch #((a) (b) (c) (d)) #((a) (b) (c)) :key #'car) 3)
(eql (mismatch #((a) (b) (c)) #((a) (b) (c) (d)) :key #'car) 3)
(eql (mismatch #(#\a #\b #\c) #(#\A #\B #\C)) 0)
(null (mismatch #(#\a #\b #\c) #(#\A #\B #\C) :key #'char-upcase))
(null (mismatch #(#\a #\b #\c) #(#\A #\B #\C) :key #'char-downcase))
(null (mismatch #(#\a #\b #\c) #(#\A #\B #\C)
:key #'char-upcase
:start1 1 :end1 2
:start2 1 :end2 2))
(null (mismatch #(#\a #\b #\c) #(#\A #\B #\C)
:key #'char-upcase
:start1 2
:start2 2))
(eql (mismatch #((a b c) (b c d) (d e f))
#((b b c) (c c d) (e e f)))
0)
(eql (mismatch #((a b c) (b c d) (d e f))
#((b b c) (c c d) (e e f))
:key #'cdr)
0)
(null (mismatch #((a b c) (b c d) (d e f))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal))
(eql (mismatch #((a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal)
3)
(eql (mismatch #((a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t)
4)
(eql (mismatch #((a a a) (a b c) (b c d) (d e f))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t)
1)
(null (mismatch #((a a a) (a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:start1 1
:end1 4))
(eql (mismatch #((a a a) (a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:start1 1)
5)
(eql (mismatch #((a a a) (a b c) (b c d) (d e f) (e f g))
#((b b c) (c c d) (e e f))
:key #'cdr
:test #'equal
:from-end t
:end1 3
:start2 1
:end2 2)
2)
(eql (mismatch "abc" "xyz") 0)
(null (mismatch "" ""))
(null (mismatch "a" "a"))
(null (mismatch "abc" "abc"))
(null (mismatch "abc" "ABC" :key #'char-downcase))
(null (mismatch "abc" "ABC" :test #'char-equal))
(eql (mismatch "abcde" "abc") 3)
(eql (mismatch "abc" "abcde") 3)
(eql (mismatch "abc" "abxyz") 2)
(eql (mismatch "abcde" "abx") 2)
(null (mismatch "abc" "abc" :from-end t))
(eql (mismatch "abcxyz" "xyzxyz" :from-end t) 3)
(eql (mismatch "abcxyz" "xyz" :from-end t) 3)
(eql (mismatch "xyz" "abcxyz" :from-end t) 0)
(eql (mismatch "ayz" "abcxyz" :from-end t) 1)
(null (mismatch "abc" "xyz" :test #'char<))
(eql (mismatch "abc" "xyz" :test #'char>) 0)
(eql (mismatch "abcxyz" "abcdefg") 3)
(eql (mismatch "1xyz" "22xyz" :from-end t) 1)
(null (mismatch #*010101 #*010101))
(eql (mismatch #*010 #*101) 0)
(eql (mismatch #*010 #*101 :from-end t) 3)
(eql (mismatch #*0101 #*010101) 4)
(eql (mismatch #*010101 #*0101) 4)
(eql (mismatch #*010100 #*010111) 4)
(null (mismatch #*0101 #*0101 :from-end t))
(eql (mismatch #*00101 #*0101 :from-end t) 1)
(eql (mismatch #*0101 #*00101 :from-end t) 0)
(eql (mismatch #*00101 #*10101 :from-end t) 1)
(equal (replace "abcdefghij" "0123456789" :start1 4 :end1 7 :start2 4)
"abcd456hij")
(let ((lst (copy-seq "012345678")))
(and (equal (replace lst lst :start1 2 :start2 0) "010123456")
(equal lst "010123456")))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z))))
(and (eq list0 list)
(equal list0 '(x y z d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 1)))
(and (eq list0 list)
(equal list0 '(a x y z e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 1 :end1 nil)))
(and (eq list0 list)
(equal list0 '(a x y z e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 1 :start2 1)))
(and (eq list0 list)
(equal list0 '(a y z d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 1 :start2 1 :end2 nil)))
(and (eq list0 list)
(equal list0 '(a y z d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 1 :end1 nil :start2 1 :end2 nil)))
(and (eq list0 list)
(equal list0 '(a y z d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 1 :end1 2 :start2 1)))
(and (eq list0 list)
(equal list0 '(a y c d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 1 :end1 1)))
(and (eq list0 list)
(equal list0 '(a b c d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 2 :end1 2)))
(and (eq list0 list)
(equal list0 '(a b c d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 3 :end1 3)))
(and (eq list0 list)
(equal list0 '(a b c d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 4 :end1 4)))
(and (eq list0 list)
(equal list0 '(a b c d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 '(x y z) :start1 5 :end1 5)))
(and (eq list0 list)
(equal list0 '(a b c d e))))
(null (replace nil nil))
(null (replace nil '(a b c)))
(let* ((list0 (list 'a 'b 'c))
(list (replace list0 '())))
(and (eq list0 list)
(equal list0 '(a b c))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 list0)))
(and (eq list0 list)
(equal list0 '(a b c d e))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 list0 :start1 3)))
(and (eq list0 list)
(equal list0 '(a b c a b))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 list0 :start1 1)))
(and (eq list0 list)
(equal list0 '(a a b c d))))
(let* ((list0 (list 'a 'b 'c 'd 'e))
(list (replace list0 list0 :start1 1 :end1 3)))
(and (eq list0 list)
(equal list0 '(a a b d e))))
(let* ((list0 (list 'a 'b 'c))
(list (replace list0 '(x y z))))
(and (eq list0 list)
(equal list0 '(x y z))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z))))
(and (eq vector0 vector)
(equalp vector0 #(x y z d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 1)))
(and (eq vector0 vector)
(equalp vector0 #(a x y z e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 1 :end1 nil)))
(and (eq vector0 vector)
(equalp vector0 #(a x y z e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 1 :start2 1)))
(and (eq vector0 vector)
(equalp vector0 #(a y z d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 1 :start2 1 :end2 nil)))
(and (eq vector0 vector)
(equalp vector0 #(a y z d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 1 :end1 nil :start2 1 :end2 nil)))
(and (eq vector0 vector)
(equalp vector0 #(a y z d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 1 :end1 2 :start2 1)))
(and (eq vector0 vector)
(equalp vector0 #(a y c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 1 :end1 1)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 2 :end1 2)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 3 :end1 3)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 4 :end1 4)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 '(x y z) :start1 5 :end1 5)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(null (replace nil #()))
(null (replace nil #(a b c)))
(let* ((vector0 (vector 'a 'b 'c))
(vector (replace vector0 '())))
(and (eq vector0 vector)
(equalp vector0 #(a b c))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 vector0)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 vector0 :start1 3)))
(and (eq vector0 vector)
(equalp vector0 #(a b c a b))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 vector0 :start1 1)))
(and (eq vector0 vector)
(equalp vector0 #(a a b c d))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 vector0 :start1 1 :end1 3)))
(and (eq vector0 vector)
(equalp vector0 #(a a b d e))))
(let* ((vector0 (vector 'a 'b 'c))
(vector (replace vector0 '(x y z))))
(and (eq vector0 vector)
(equalp vector0 #(x y z))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z))))
(and (eq vector0 vector)
(equalp vector0 #(x y z d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 1)))
(and (eq vector0 vector)
(equalp vector0 #(a x y z e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 1 :end1 nil)))
(and (eq vector0 vector)
(equalp vector0 #(a x y z e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 1 :start2 1)))
(and (eq vector0 vector)
(equalp vector0 #(a y z d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 1 :start2 1 :end2 nil)))
(and (eq vector0 vector)
(equalp vector0 #(a y z d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 1 :end1 nil :start2 1 :end2 nil)))
(and (eq vector0 vector)
(equalp vector0 #(a y z d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 1 :end1 2 :start2 1)))
(and (eq vector0 vector)
(equalp vector0 #(a y c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 1 :end1 1)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 2 :end1 2)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 3 :end1 3)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 4 :end1 4)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 #(x y z) :start1 5 :end1 5)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(null (replace nil #()))
(null (replace nil #(a b c)))
(let* ((vector0 (vector 'a 'b 'c))
(vector (replace vector0 #())))
(and (eq vector0 vector)
(equalp vector0 #(a b c))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 vector0)))
(and (eq vector0 vector)
(equalp vector0 #(a b c d e))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 vector0 :start1 3)))
(and (eq vector0 vector)
(equalp vector0 #(a b c a b))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 vector0 :start1 1)))
(and (eq vector0 vector)
(equalp vector0 #(a a b c d))))
(let* ((vector0 (vector 'a 'b 'c 'd 'e))
(vector (replace vector0 vector0 :start1 1 :end1 3)))
(and (eq vector0 vector)
(equalp vector0 #(a a b d e))))
(let* ((vector0 (vector 'a 'b 'c))
(vector (replace vector0 #(x y z))))
(and (eq vector0 vector)
(equalp vector0 #(x y z))))
(let* ((str0 (copy-seq "abc"))
(str (replace str0 "xyz")))
(and (eq str0 str)
(equalp str0 "xyz")))
(let* ((str0 (copy-seq ""))
(str (replace str0 "")))
(and (eq str0 str)
(equalp str0 "")))
(let* ((str0 (copy-seq ""))
(str (replace str0 "xyz")))
(and (eq str0 str)
(equalp str0 "")))
(let* ((str0 (copy-seq "abc"))
(str (replace str0 "")))
(and (eq str0 str)
(equalp str0 "abc")))
(let* ((str0 (copy-seq "abcdef"))
(str (replace str0 "xyz" :start1 3)))
(and (eq str0 str)
(equalp str0 "abcxyz")))
(let* ((str0 (copy-seq "abcdef"))
(str (replace str0 "xyz" :start1 4 :start2 1)))
(and (eq str0 str)
(equalp str0 "abcdyz")))
(let* ((str0 (copy-seq "abcdef"))
(str (replace str0 "xyz" :start1 1 :end1 2 :start2 1)))
(and (eq str0 str)
(equalp str0 "aycdef")))
(let* ((str0 (copy-seq "abcdef"))
(str (replace str0 "xyz" :start1 1 :start2 1 :end2 2)))
(and (eq str0 str)
(equalp str0 "aycdef")))
(let* ((str0 (copy-seq "abcdef"))
(str (replace str0 str0 :start1 1)))
(and (eq str0 str)
(equalp str0 "aabcde")))
(let* ((bv0 (copy-seq #*0000))
(bv (replace bv0 #*1010)))
(and (eq bv0 bv)
(equalp bv0 #*1010)))
(let* ((bv0 (copy-seq #*))
(bv (replace bv0 #*1010)))
(and (eq bv0 bv)
(equalp bv0 #*)))
(let* ((bv0 (copy-seq #*0000))
(bv (replace bv0 #*)))
(and (eq bv0 bv)
(equalp bv0 #*0000)))
(let* ((bv0 (copy-seq #*0000))
(bv (replace bv0 #*1111 :start1 2)))
(and (eq bv0 bv)
(equalp bv0 #*0011)))
(let* ((bv0 (copy-seq #*1001))
(bv (replace bv0 #*0110 :start1 1 :end1 3 :start2 1 :end2 3)))
(and (eq bv0 bv)
(equalp bv0 #*1111)))
(let* ((bv0 (copy-seq #*1010))
(bv (replace bv0 bv0 :start1 1)))
(and (eq bv0 bv)
(equalp bv0 #*1101)))
(equal (substitute #\. #\SPACE "0 2 4 6") "0.2.4.6")
(equal (substitute 9 4 '(1 2 4 1 3 4 5)) '(1 2 9 1 3 9 5))
(equal (substitute 9 4 '(1 2 4 1 3 4 5) :count 1) '(1 2 9 1 3 4 5))
(equal (substitute 9 4 '(1 2 4 1 3 4 5) :count 1 :from-end t) '(1 2 4 1 3 9 5))
(equal (substitute 9 3 '(1 2 4 1 3 4 5) :test #'>) '(9 9 4 9 3 4 5))
(equal (substitute-if 0 #'evenp '((1) (2) (3) (4)) :start 2 :key #'car)
'((1) (2) (3) 0))
(equal (substitute-if 9 #'oddp '(1 2 4 1 3 4 5)) '(9 2 4 9 9 4 9))
(equal (substitute-if 9 #'evenp '(1 2 4 1 3 4 5) :count 1 :from-end t)
'(1 2 4 1 3 9 5))
(let ((some-things (list 'a 'car 'b 'cdr 'c)))
(and (equal (nsubstitute-if "function was here" #'fboundp some-things
:count 1 :from-end t)
'(A CAR B "function was here" C))
(equal some-things '(A CAR B "function was here" C))))
(let ((alpha-tester (copy-seq "ab ")))
(and (equal (nsubstitute-if-not #\z #'alpha-char-p alpha-tester) "abz")
(equal alpha-tester "abz")))
(equal (substitute 'a 'x '(x y z)) '(a y z))
(equal (substitute 'b 'y '(x y z)) '(x b z))
(equal (substitute 'c 'z '(x y z)) '(x y c))
(equal (substitute 'a 'p '(x y z)) '(x y z))
(equal (substitute 'a 'x '()) '())
(equal (substitute #\x #\b '(#\a #\b #\c #\d #\e) :test #'char<)
'(#\a #\b #\x #\x #\x))
(equal (substitute #\x #\b '(#\a #\b #\c #\d #\e)
:test-not (complement #'char<))
'(#\a #\b #\x #\x #\x))
(equal (substitute '(a) 'x '((x) (y) (z)) :key #'car)
'((a) (y) (z)))
(equal (substitute 'c 'b '(a b a b a b a b)) '(a c a c a c a c))
(equal (substitute 'a 'b '(b b b)) '(a a a))
(equal (substitute 'z 'x '(a x b x c x d x e x f))
'(a z b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count nil)
'(a z b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 0)
'(a x b x c x d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count -100)
'(a x b x c x d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 1)
'(a z b x c x d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 2)
'(a z b z c x d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 3)
'(a z b z c z d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 4)
'(a z b z c z d z e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 5)
'(a z b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 6)
'(a z b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 7)
'(a z b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count nil :from-end t)
'(a z b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 0 :from-end t)
'(a x b x c x d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count -100 :from-end t)
'(a x b x c x d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 1 :from-end t)
'(a x b x c x d x e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 2 :from-end t)
'(a x b x c x d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 3 :from-end t)
'(a x b x c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 4 :from-end t)
'(a x b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 5 :from-end t)
'(a z b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 6 :from-end t)
'(a z b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :count 7 :from-end t)
'(a z b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :start 2 :count 1)
'(a x b z c x d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :start 2 :end nil :count 1)
'(a x b z c x d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :start 2 :end 6 :count 100)
'(a x b z c z d x e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :start 2 :end 11 :count 100)
'(a x b z c z d z e z f))
(equal (substitute 'z 'x '(a x b x c x d x e x f) :start 2 :end 8 :count 10)
'(a x b z c z d z e x f))
(equal (substitute 'z 'x '(a x b x c x d x e x f)
:start 2 :end 8 :count 2 :from-end t)
'(a x b x c z d z e x f))
(equal (substitute #\z #\c '(#\a #\b #\c #\d #\e #\f) :test #'char<)
'(#\a #\b #\c #\z #\z #\z))
(equal (substitute #\z #\c '(#\a #\b #\c #\d #\e #\f)
:test-not (complement #'char<))
'(#\a #\b #\c #\z #\z #\z))
(equal (substitute "peace" "war" '("love" "hate" "war" "peace") :test #'equal)
'("love" "hate" "peace" "peace"))
(equal (substitute "peace" "war" '("love" "hate" "war" "peace")
:test-not (complement #'equal))
'("love" "hate" "peace" "peace"))
(equal (substitute "peace" "war" '("war" "War" "WAr" "WAR")
:test #'string-equal)
'("peace" "peace" "peace" "peace"))
(equal (substitute "peace" "war" '("war" "War" "WAr" "WAR")
:test-not (complement #'string-equal))
'("peace" "peace" "peace" "peace"))
(equal (substitute "peace" "WAR" '("war" "War" "WAr" "WAR")
:test #'string=)
'("war" "War" "WAr" "peace"))
(equal (substitute "peace" "WAR" '("war" "War" "WAr" "WAR")
:test-not (complement #'string=))
'("war" "War" "WAr" "peace"))
(equal (substitute "peace" "WAR" '("war" "War" "WAr" "WAR")
:test #'string=
:key #'string-upcase)
'("peace" "peace" "peace" "peace"))
(equal (substitute "peace" "WAR" '("war" "War" "WAr" "WAR")
:test-not (complement #'string=)
:key #'string-upcase)
'("peace" "peace" "peace" "peace"))
(equal (substitute "peace" "WAR" '("war" "War" "WAr" "WAR")
:start 1
:end 2
:test #'string=
:key #'string-upcase)
'("war" "peace" "WAr" "WAR"))
(equal (substitute "peace" "WAR" '("war" "War" "WAr" "WAR")
:start 1
:end 2
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "WAr" "WAR"))
(equal (substitute "peace" "WAR" '("war" "War" "WAr" "WAR")
:start 1
:end nil
:test #'string=
:key #'string-upcase)
'("war" "peace" "peace" "peace"))
(equal (substitute "peace" "WAR" '("war" "War" "WAr" "WAR")
:start 1
:end nil
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace"))
(equal (substitute "peace" "war" '("war" "War" "WAr" "WAR")
:test #'string=
:key #'string-upcase)
'("war" "War" "WAr" "WAR"))
(equal (substitute "peace" "war" '("war" "War" "WAr" "WAR")
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "War" "WAr" "WAR"))
(equal (substitute "peace" "WAR"
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 1
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute "peace" "WAR"
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute "peace" "WAR"
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equal (substitute "peace" "WAR"
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 0
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute "peace" "WAR"
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count -2
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute "peace" "WAR"
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count nil
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (substitute "peace" "WAR"
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 6
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (substitute "peace" "WAR"
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 7
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (substitute "peace" "WAR"
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 100
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute 'a 'x #(x y z)) #(a y z))
(equalp (substitute 'b 'y #(x y z)) #(x b z))
(equalp (substitute 'c 'z #(x y z)) #(x y c))
(equalp (substitute 'a 'p #(x y z)) #(x y z))
(equalp (substitute 'a 'x #()) #())
(equalp (substitute #\x #\b #(#\a #\b #\c #\d #\e) :test #'char<)
#(#\a #\b #\x #\x #\x))
(equalp (substitute #\x #\b #(#\a #\b #\c #\d #\e)
:test-not (complement #'char<))
#(#\a #\b #\x #\x #\x))
(equalp (substitute '(a) 'x #((x) (y) (z)) :key #'car)
#((a) (y) (z)))
(equalp (substitute 'c 'b #(a b a b a b a b)) #(a c a c a c a c))
(equalp (substitute 'a 'b #(b b b)) #(a a a))
(equalp (substitute 'z 'x #(a x b x c x d x e x f))
#(a z b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count nil)
#(a z b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 0)
#(a x b x c x d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count -100)
#(a x b x c x d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 1)
#(a z b x c x d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 2)
#(a z b z c x d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 3)
#(a z b z c z d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 4)
#(a z b z c z d z e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 5)
#(a z b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 6)
#(a z b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 7)
#(a z b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count nil :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 0 :from-end t)
#(a x b x c x d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count -100 :from-end t)
#(a x b x c x d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 1 :from-end t)
#(a x b x c x d x e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 2 :from-end t)
#(a x b x c x d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 3 :from-end t)
#(a x b x c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 4 :from-end t)
#(a x b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 5 :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 6 :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :count 7 :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :start 2 :count 1)
#(a x b z c x d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :start 2 :end nil :count 1)
#(a x b z c x d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :start 2 :end 6 :count 100)
#(a x b z c z d x e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :start 2 :end 11 :count 100)
#(a x b z c z d z e z f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f) :start 2 :end 8 :count 10)
#(a x b z c z d z e x f))
(equalp (substitute 'z 'x #(a x b x c x d x e x f)
:start 2 :end 8 :count 2 :from-end t)
#(a x b x c z d z e x f))
(equalp (substitute #\z #\c #(#\a #\b #\c #\d #\e #\f) :test #'char<)
#(#\a #\b #\c #\z #\z #\z))
(equalp (substitute #\z #\c #(#\a #\b #\c #\d #\e #\f)
:test-not (complement #'char<))
#(#\a #\b #\c #\z #\z #\z))
(equalp (substitute "peace" "war" #("love" "hate" "war" "peace") :test #'equal)
#("love" "hate" "peace" "peace"))
(equalp (substitute "peace" "war" #("love" "hate" "war" "peace")
:test-not (complement #'equal))
#("love" "hate" "peace" "peace"))
(equalp (substitute "peace" "war" #("war" "War" "WAr" "WAR")
:test #'string-equal)
#("peace" "peace" "peace" "peace"))
(equalp (substitute "peace" "war" #("war" "War" "WAr" "WAR")
:test-not (complement #'string-equal))
#("peace" "peace" "peace" "peace"))
(equalp (substitute "peace" "WAR" #("war" "War" "WAr" "WAR")
:test #'string=)
#("war" "War" "WAr" "peace"))
(equalp (substitute "peace" "WAR" #("war" "War" "WAr" "WAR")
:test-not (complement #'string=))
#("war" "War" "WAr" "peace"))
(equalp (substitute "peace" "WAR" #("war" "War" "WAr" "WAR")
:test #'string=
:key #'string-upcase)
#("peace" "peace" "peace" "peace"))
(equalp (substitute "peace" "WAR" #("war" "War" "WAr" "WAR")
:test-not (complement #'string=)
:key #'string-upcase)
#("peace" "peace" "peace" "peace"))
(equalp (substitute "peace" "WAR" #("war" "War" "WAr" "WAR")
:start 1
:end 2
:test #'string=
:key #'string-upcase)
#("war" "peace" "WAr" "WAR"))
(equalp (substitute "peace" "WAR" #("war" "War" "WAr" "WAR")
:start 1
:end 2
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "WAr" "WAR"))
(equalp (substitute "peace" "WAR" #("war" "War" "WAr" "WAR")
:start 1
:end nil
:test #'string=
:key #'string-upcase)
#("war" "peace" "peace" "peace"))
(equalp (substitute "peace" "WAR" #("war" "War" "WAr" "WAR")
:start 1
:end nil
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace"))
(equalp (substitute "peace" "war" #("war" "War" "WAr" "WAR")
:test #'string=
:key #'string-upcase)
#("war" "War" "WAr" "WAR"))
(equalp (substitute "peace" "war" #("war" "War" "WAr" "WAR")
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "War" "WAr" "WAR"))
(equalp (substitute "peace" "WAR"
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 1
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute "peace" "WAR"
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute "peace" "WAR"
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equalp (substitute "peace" "WAR"
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 0
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute "peace" "WAR"
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count -2
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute "peace" "WAR"
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count nil
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute "peace" "WAR"
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 6
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute "peace" "WAR"
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 7
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute "peace" "WAR"
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 100
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(string= (substitute #\A #\a "abcabc") "AbcAbc")
(string= (substitute #\A #\a "") "")
(string= (substitute #\A #\a "xyz") "xyz")
(string= (substitute #\A #\a "aaaaaaaaaa" :start 5 :end nil) "aaaaaAAAAA")
(string= (substitute #\x #\5 "0123456789" :test #'char<) "012345xxxx")
(string= (substitute #\x #\5 "0123456789" :test #'char>) "xxxxx56789")
(string= (substitute #\x #\D "abcdefg"
:key #'char-upcase
:test #'char>)
"xxxdefg")
(string= (substitute #\x #\D "abcdefg"
:start 1
:end 2
:key #'char-upcase
:test #'char>)
"axcdefg")
(string= (substitute #\A #\a "aaaaaaaaaa" :count 2) "AAaaaaaaaa")
(string= (substitute #\A #\a "aaaaaaaaaa" :count -1) "aaaaaaaaaa")
(string= (substitute #\A #\a "aaaaaaaaaa" :count 0) "aaaaaaaaaa")
(string= (substitute #\A #\a "aaaaaaaaaa" :count nil) "AAAAAAAAAA")
(string= (substitute #\A #\a "aaaaaaaaaa" :count 100) "AAAAAAAAAA")
(string= (substitute #\A #\a "aaaaaaaaaa" :count 9) "AAAAAAAAAa")
(string= (substitute #\A #\a "aaaaaaaaaa" :count 9 :from-end t) "aAAAAAAAAA")
(string= (substitute #\A #\a "aaaaaaaaaa"
:start 2
:end 8
:count 3)
"aaAAAaaaaa")
(string= (substitute #\A #\a "aaaaaaaaaa"
:start 2
:end 8
:from-end t
:count 3)
"aaaaaAAAaa")
(string= (substitute #\x #\A "aaaaaaaaaa"
:start 2
:end 8
:from-end t
:count 3)
"aaaaaaaaaa")
(string= (substitute #\X #\A "aaaaaaaaaa"
:start 2
:end 8
:from-end t
:key #'char-upcase
:count 3)
"aaaaaXXXaa")
(string= (substitute #\X #\D "abcdefghij"
:start 2
:end 8
:from-end t
:key #'char-upcase
:test #'char<
:count 3)
"abcdeXXXij")
(equalp (substitute 0 1 #*1111) #*0000)
(equalp (substitute 0 1 #*1111 :start 1 :end nil) #*1000)
(equalp (substitute 0 1 #*1111 :start 1 :end 3) #*1001)
(equalp (substitute 0 1 #*11111111 :start 1 :end 7) #*10000001)
(equalp (substitute 0 1 #*11111111 :start 1 :end 7 :count 3) #*10001111)
(equalp (substitute 0 1 #*11111111 :start 1 :end 7 :count 3 :from-end t)
#*11110001)
(equalp (substitute 1 1 #*10101010
:start 1 :end 7 :count 3 :from-end t
:key #'(lambda (x) (if (zerop x) 1 0)))
#*11111110)
(equalp (substitute 1 1 #*10101010
:start 1 :end 7 :count 3 :from-end t
:key #'(lambda (x) (if (zerop x) 1 0))
:test #'>=)
#*10101110)
(equal (substitute-if 'a #'(lambda (arg) (eq arg 'x)) '(x y z)) '(a y z))
(equal (substitute-if 'b #'(lambda (arg) (eq arg 'y)) '(x y z)) '(x b z))
(equal (substitute-if 'c #'(lambda (arg) (eq arg 'z)) '(x y z)) '(x y c))
(equal (substitute-if 'a #'(lambda (arg) (eq arg 'p)) '(x y z)) '(x y z))
(equal (substitute-if 'a #'(lambda (arg) (eq arg 'x)) '()) '())
(equal (substitute-if #\x #'(lambda (arg) (char< #\b arg))
'(#\a #\b #\c #\d #\e))
'(#\a #\b #\x #\x #\x))
(equal (substitute-if '(a) #'(lambda (arg) (eq arg 'x))
'((x) (y) (z)) :key #'car)
'((a) (y) (z)))
(equal (substitute-if 'c #'(lambda (arg) (eq arg 'b))
'(a b a b a b a b)) '(a c a c a c a c))
(equal (substitute-if 'a #'(lambda (arg) (eq arg 'b))
'(b b b)) '(a a a))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f))
'(a z b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count nil)
'(a z b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 0)
'(a x b x c x d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count -100)
'(a x b x c x d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 1)
'(a z b x c x d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 2)
'(a z b z c x d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 3)
'(a z b z c z d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 4)
'(a z b z c z d z e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 5)
'(a z b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 6)
'(a z b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 7)
'(a z b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count nil :from-end t)
'(a z b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 0 :from-end t)
'(a x b x c x d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count -100 :from-end t)
'(a x b x c x d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 1 :from-end t)
'(a x b x c x d x e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 2 :from-end t)
'(a x b x c x d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 3 :from-end t)
'(a x b x c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 4 :from-end t)
'(a x b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 5 :from-end t)
'(a z b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 6 :from-end t)
'(a z b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :count 7 :from-end t)
'(a z b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :start 2 :count 1)
'(a x b z c x d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :start 2 :end nil :count 1)
'(a x b z c x d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :start 2 :end 6 :count 100)
'(a x b z c z d x e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :start 2 :end 11 :count 100)
'(a x b z c z d z e z f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f) :start 2 :end 8 :count 10)
'(a x b z c z d z e x f))
(equal (substitute-if 'z #'(lambda (arg) (eq arg 'x))
'(a x b x c x d x e x f)
:start 2 :end 8 :count 2 :from-end t)
'(a x b x c z d z e x f))
(equal (substitute-if #\z #'(lambda (arg) (char< #\c arg))
'(#\a #\b #\c #\d #\e #\f))
'(#\a #\b #\c #\z #\z #\z))
(equal (substitute-if "peace" #'(lambda (arg) (equal "war" arg))
'("love" "hate" "war" "peace"))
'("love" "hate" "peace" "peace"))
(equal (substitute-if "peace" #'(lambda (arg) (string-equal "war" arg))
'("war" "War" "WAr" "WAR"))
'("peace" "peace" "peace" "peace"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR")
:key #'string-upcase)
'("peace" "peace" "peace" "peace"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR")
:start 1
:end 2
:key #'string-upcase)
'("war" "peace" "WAr" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR")
:start 1
:end nil
:key #'string-upcase)
'("war" "peace" "peace" "peace"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "war" arg))
'("war" "War" "WAr" "WAR")
:key #'string-upcase)
'("war" "War" "WAr" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 1
:key #'string-upcase)
'("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:key #'string-upcase)
'("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:from-end t
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 0
:from-end t
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count -2
:from-end t
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count nil
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 6
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 7
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 100
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute-if 'a #'(lambda (arg) (eq arg 'x)) #(x y z)) #(a y z))
(equalp (substitute-if 'b #'(lambda (arg) (eq arg 'y)) #(x y z)) #(x b z))
(equalp (substitute-if 'c #'(lambda (arg) (eq arg 'z)) #(x y z)) #(x y c))
(equalp (substitute-if 'a #'(lambda (arg) (eq arg 'p)) #(x y z)) #(x y z))
(equalp (substitute-if 'a #'(lambda (arg) (eq arg 'x)) #()) #())
(equalp (substitute-if #\x #'(lambda (arg) (char< #\b arg))
#(#\a #\b #\c #\d #\e))
#(#\a #\b #\x #\x #\x))
(equalp (substitute-if '(a) #'(lambda (arg) (eq arg 'x))
#((x) (y) (z)) :key #'car)
#((a) (y) (z)))
(equalp (substitute-if 'c #'(lambda (arg) (eq arg 'b))
#(a b a b a b a b)) #(a c a c a c a c))
(equalp (substitute-if 'a #'(lambda (arg) (eq arg 'b))
#(b b b)) #(a a a))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f))
#(a z b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count nil)
#(a z b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 0)
#(a x b x c x d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count -100)
#(a x b x c x d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 1)
#(a z b x c x d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 2)
#(a z b z c x d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 3)
#(a z b z c z d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 4)
#(a z b z c z d z e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 5)
#(a z b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 6)
#(a z b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 7)
#(a z b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count nil :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 0 :from-end t)
#(a x b x c x d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count -100 :from-end t)
#(a x b x c x d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 1 :from-end t)
#(a x b x c x d x e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 2 :from-end t)
#(a x b x c x d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 3 :from-end t)
#(a x b x c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 4 :from-end t)
#(a x b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 5 :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 6 :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :count 7 :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :start 2 :count 1)
#(a x b z c x d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :start 2 :end nil :count 1)
#(a x b z c x d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :start 2 :end 6 :count 100)
#(a x b z c z d x e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :start 2 :end 11 :count 100)
#(a x b z c z d z e z f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f) :start 2 :end 8 :count 10)
#(a x b z c z d z e x f))
(equalp (substitute-if 'z #'(lambda (arg) (eq arg 'x))
#(a x b x c x d x e x f)
:start 2 :end 8 :count 2 :from-end t)
#(a x b x c z d z e x f))
(equalp (substitute-if #\z #'(lambda (arg) (char< #\c arg))
#(#\a #\b #\c #\d #\e #\f))
#(#\a #\b #\c #\z #\z #\z))
(equalp (substitute-if "peace" #'(lambda (arg) (equal "war" arg))
#("love" "hate" "war" "peace"))
#("love" "hate" "peace" "peace"))
(equalp (substitute-if "peace" #'(lambda (arg) (string-equal "war" arg))
#("war" "War" "WAr" "WAR"))
#("peace" "peace" "peace" "peace"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR")
:key #'string-upcase)
#("peace" "peace" "peace" "peace"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR")
:start 1
:end 2
:key #'string-upcase)
#("war" "peace" "WAr" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR")
:start 1
:end nil
:key #'string-upcase)
#("war" "peace" "peace" "peace"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "war" arg))
#("war" "War" "WAr" "WAR")
:key #'string-upcase)
#("war" "War" "WAr" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 1
:key #'string-upcase)
#("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:key #'string-upcase)
#("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:from-end t
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 0
:from-end t
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count -2
:from-end t
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count nil
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 6
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 7
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 100
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg)) "abcabc") "AbcAbc")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg)) "") "")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg)) "xyz") "xyz")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa" :start 5 :end nil) "aaaaaAAAAA")
(string= (substitute-if #\x #'(lambda (arg) (char< #\5 arg))
"0123456789") "012345xxxx")
(string= (substitute-if #\x #'(lambda (arg) (char> #\5 arg))
"0123456789") "xxxxx56789")
(string= (substitute-if #\x #'(lambda (arg) (char> #\D arg)) "abcdefg"
:key #'char-upcase)
"xxxdefg")
(string= (substitute-if #\x #'(lambda (arg) (char> #\D arg)) "abcdefg"
:start 1
:end 2
:key #'char-upcase)
"axcdefg")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa" :count 2) "AAaaaaaaaa")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa" :count -1) "aaaaaaaaaa")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa" :count 0) "aaaaaaaaaa")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa" :count nil) "AAAAAAAAAA")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa" :count 100) "AAAAAAAAAA")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa" :count 9) "AAAAAAAAAa")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa" :count 9 :from-end t) "aAAAAAAAAA")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa"
:start 2
:end 8
:count 3)
"aaAAAaaaaa")
(string= (substitute-if #\A #'(lambda (arg) (eql #\a arg))
"aaaaaaaaaa"
:start 2
:end 8
:from-end t
:count 3)
"aaaaaAAAaa")
(string= (substitute-if #\x #'(lambda (arg) (eql #\A arg))
"aaaaaaaaaa"
:start 2
:end 8
:from-end t
:count 3)
"aaaaaaaaaa")
(string= (substitute-if #\X #'(lambda (arg) (eql #\A arg))
"aaaaaaaaaa"
:start 2
:end 8
:from-end t
:key #'char-upcase
:count 3)
"aaaaaXXXaa")
(string= (substitute-if #\X #'(lambda (arg) (char< #\D arg))
"abcdefghij"
:start 2
:end 8
:from-end t
:key #'char-upcase
:count 3)
"abcdeXXXij")
(equalp (substitute-if 0 #'(lambda (arg) (= 1 arg)) #*1111) #*0000)
(equalp (substitute-if 0 #'(lambda (arg) (= 1 arg))
#*1111 :start 1 :end nil) #*1000)
(equalp (substitute-if 0 #'(lambda (arg) (= 1 arg))
#*1111 :start 1 :end 3) #*1001)
(equalp (substitute-if 0 #'(lambda (arg) (= 1 arg))
#*11111111 :start 1 :end 7) #*10000001)
(equalp (substitute-if 0 #'(lambda (arg) (= 1 arg))
#*11111111 :start 1 :end 7 :count 3) #*10001111)
(equalp (substitute-if 0 #'(lambda (arg) (= 1 arg))
#*11111111 :start 1 :end 7 :count 3 :from-end t)
#*11110001)
(equalp (substitute-if 1 #'(lambda (arg) (= 1 arg))
#*10101010
:start 1 :end 7 :count 3 :from-end t
:key #'(lambda (x) (if (zerop x) 1 0)))
#*11111110)
(equalp (substitute-if 1 #'(lambda (arg) (>= 1 arg))
#*10101010
:start 1 :end 7 :count 3 :from-end t
:key #'(lambda (x) (if (zerop x) 1 0)))
#*10101110)
(equal (substitute-if-not 'a #'(lambda (arg) (not (eq arg 'x))) '(x y z))
'(a y z))
(equal (substitute-if-not 'b #'(lambda (arg) (not (eq arg 'y))) '(x y z))
'(x b z))
(equal (substitute-if-not 'c #'(lambda (arg) (not (eq arg 'z))) '(x y z))
'(x y c))
(equal (substitute-if-not 'a #'(lambda (arg) (not (eq arg 'p))) '(x y z))
'(x y z))
(equal (substitute-if-not 'a #'(lambda (arg) (not (eq arg 'x))) '()) '())
(equal (substitute-if-not #\x #'(lambda (arg) (not (char< #\b arg)))
'(#\a #\b #\c #\d #\e))
'(#\a #\b #\x #\x #\x))
(equal (substitute-if-not '(a) #'(lambda (arg) (not (eq arg 'x)))
'((x) (y) (z)) :key #'car)
'((a) (y) (z)))
(equal (substitute-if-not 'c #'(lambda (arg) (not (eq arg 'b)))
'(a b a b a b a b)) '(a c a c a c a c))
(equal (substitute-if-not 'a #'(lambda (arg) (not (eq arg 'b)))
'(b b b)) '(a a a))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f))
'(a z b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count nil)
'(a z b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 0)
'(a x b x c x d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count -100)
'(a x b x c x d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 1)
'(a z b x c x d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 2)
'(a z b z c x d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 3)
'(a z b z c z d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 4)
'(a z b z c z d z e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 5)
'(a z b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 6)
'(a z b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 7)
'(a z b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count nil :from-end t)
'(a z b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 0 :from-end t)
'(a x b x c x d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count -100 :from-end t)
'(a x b x c x d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 1 :from-end t)
'(a x b x c x d x e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 2 :from-end t)
'(a x b x c x d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 3 :from-end t)
'(a x b x c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 4 :from-end t)
'(a x b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 5 :from-end t)
'(a z b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 6 :from-end t)
'(a z b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :count 7 :from-end t)
'(a z b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :start 2 :count 1)
'(a x b z c x d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :start 2 :end nil :count 1)
'(a x b z c x d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :start 2 :end 6 :count 100)
'(a x b z c z d x e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :start 2 :end 11 :count 100)
'(a x b z c z d z e z f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f) :start 2 :end 8 :count 10)
'(a x b z c z d z e x f))
(equal (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
'(a x b x c x d x e x f)
:start 2 :end 8 :count 2 :from-end t)
'(a x b x c z d z e x f))
(equal (substitute-if-not #\z #'(lambda (arg) (not (char< #\c arg)))
'(#\a #\b #\c #\d #\e #\f))
'(#\a #\b #\c #\z #\z #\z))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (equal "war" arg)))
'("love" "hate" "war" "peace"))
'("love" "hate" "peace" "peace"))
(equal (substitute-if-not "peace"
#'(lambda (arg) (not (string-equal "war" arg)))
'("war" "War" "WAr" "WAR"))
'("peace" "peace" "peace" "peace"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR")
:key #'string-upcase)
'("peace" "peace" "peace" "peace"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR")
:start 1
:end 2
:key #'string-upcase)
'("war" "peace" "WAr" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR")
:start 1
:end nil
:key #'string-upcase)
'("war" "peace" "peace" "peace"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "war" arg)))
'("war" "War" "WAr" "WAR")
:key #'string-upcase)
'("war" "War" "WAr" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 1
:key #'string-upcase)
'("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:key #'string-upcase)
'("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:from-end t
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 0
:from-end t
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count -2
:from-end t
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count nil
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 6
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 7
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 100
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute-if-not 'a #'(lambda (arg) (not (eq arg 'x)))
#(x y z)) #(a y z))
(equalp (substitute-if-not 'b #'(lambda (arg) (not (eq arg 'y)))
#(x y z)) #(x b z))
(equalp (substitute-if-not 'c #'(lambda (arg) (not (eq arg 'z)))
#(x y z)) #(x y c))
(equalp (substitute-if-not 'a #'(lambda (arg) (not (eq arg 'p)))
#(x y z)) #(x y z))
(equalp (substitute-if-not 'a #'(lambda (arg) (not (eq arg 'x)))
#()) #())
(equalp (substitute-if-not #\x #'(lambda (arg) (not (char< #\b arg)))
#(#\a #\b #\c #\d #\e))
#(#\a #\b #\x #\x #\x))
(equalp (substitute-if-not '(a) #'(lambda (arg) (not (eq arg 'x)))
#((x) (y) (z)) :key #'car)
#((a) (y) (z)))
(equalp (substitute-if-not 'c #'(lambda (arg) (not (eq arg 'b)))
#(a b a b a b a b)) #(a c a c a c a c))
(equalp (substitute-if-not 'a #'(lambda (arg) (not (eq arg 'b)))
#(b b b)) #(a a a))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f))
#(a z b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count nil)
#(a z b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 0)
#(a x b x c x d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count -100)
#(a x b x c x d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 1)
#(a z b x c x d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 2)
#(a z b z c x d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 3)
#(a z b z c z d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 4)
#(a z b z c z d z e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 5)
#(a z b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 6)
#(a z b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 7)
#(a z b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count nil :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 0 :from-end t)
#(a x b x c x d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count -100 :from-end t)
#(a x b x c x d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 1 :from-end t)
#(a x b x c x d x e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 2 :from-end t)
#(a x b x c x d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 3 :from-end t)
#(a x b x c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 4 :from-end t)
#(a x b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 5 :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 6 :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :count 7 :from-end t)
#(a z b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :start 2 :count 1)
#(a x b z c x d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :start 2 :end nil :count 1)
#(a x b z c x d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :start 2 :end 6 :count 100)
#(a x b z c z d x e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :start 2 :end 11 :count 100)
#(a x b z c z d z e z f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f) :start 2 :end 8 :count 10)
#(a x b z c z d z e x f))
(equalp (substitute-if-not 'z #'(lambda (arg) (not (eq arg 'x)))
#(a x b x c x d x e x f)
:start 2 :end 8 :count 2 :from-end t)
#(a x b x c z d z e x f))
(equalp (substitute-if-not #\z #'(lambda (arg) (not (char< #\c arg)))
#(#\a #\b #\c #\d #\e #\f))
#(#\a #\b #\c #\z #\z #\z))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (equal "war" arg)))
#("love" "hate" "war" "peace"))
#("love" "hate" "peace" "peace"))
(equalp (substitute-if-not "peace"
#'(lambda (arg) (not (string-equal "war" arg)))
#("war" "War" "WAr" "WAR"))
#("peace" "peace" "peace" "peace"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR")
:key #'string-upcase)
#("peace" "peace" "peace" "peace"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR")
:start 1
:end 2
:key #'string-upcase)
#("war" "peace" "WAr" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR")
:start 1
:end nil
:key #'string-upcase)
#("war" "peace" "peace" "peace"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "war" arg)))
#("war" "War" "WAr" "WAR")
:key #'string-upcase)
#("war" "War" "WAr" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 1
:key #'string-upcase)
#("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:key #'string-upcase)
#("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 2
:from-end t
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 0
:from-end t
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count -2
:from-end t
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count nil
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 6
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 7
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (substitute-if-not "peace" #'(lambda (arg) (not (string= "WAR" arg)))
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR")
:start 1
:end 7
:count 100
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg))) "abcabc")
"AbcAbc")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg))) "") "")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg))) "xyz")
"xyz")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa" :start 5 :end nil) "aaaaaAAAAA")
(string= (substitute-if-not #\x #'(lambda (arg) (not (char< #\5 arg)))
"0123456789") "012345xxxx")
(string= (substitute-if-not #\x #'(lambda (arg) (not (char> #\5 arg)))
"0123456789") "xxxxx56789")
(string= (substitute-if-not #\x #'(lambda (arg) (not (char> #\D arg)))
"abcdefg"
:key #'char-upcase)
"xxxdefg")
(string= (substitute-if-not #\x #'(lambda (arg) (not (char> #\D arg)))
"abcdefg"
:start 1
:end 2
:key #'char-upcase)
"axcdefg")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa" :count 2) "AAaaaaaaaa")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa" :count -1) "aaaaaaaaaa")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa" :count 0) "aaaaaaaaaa")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa" :count nil) "AAAAAAAAAA")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa" :count 100) "AAAAAAAAAA")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa" :count 9) "AAAAAAAAAa")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa" :count 9 :from-end t) "aAAAAAAAAA")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa"
:start 2
:end 8
:count 3)
"aaAAAaaaaa")
(string= (substitute-if-not #\A #'(lambda (arg) (not (eql #\a arg)))
"aaaaaaaaaa"
:start 2
:end 8
:from-end t
:count 3)
"aaaaaAAAaa")
(string= (substitute-if-not #\x #'(lambda (arg) (not (eql #\A arg)))
"aaaaaaaaaa"
:start 2
:end 8
:from-end t
:count 3)
"aaaaaaaaaa")
(string= (substitute-if-not #\X #'(lambda (arg) (not (eql #\A arg)))
"aaaaaaaaaa"
:start 2
:end 8
:from-end t
:key #'char-upcase
:count 3)
"aaaaaXXXaa")
(string= (substitute-if-not #\X #'(lambda (arg) (not (char< #\D arg)))
"abcdefghij"
:start 2
:end 8
:from-end t
:key #'char-upcase
:count 3)
"abcdeXXXij")
(equalp (substitute-if-not 0 #'(lambda (arg) (not (= 1 arg))) #*1111) #*0000)
(equalp (substitute-if-not 0 #'(lambda (arg) (not (= 1 arg)))
#*1111 :start 1 :end nil) #*1000)
(equalp (substitute-if-not 0 #'(lambda (arg) (not (= 1 arg)))
#*1111 :start 1 :end 3) #*1001)
(equalp (substitute-if-not 0 #'(lambda (arg) (not (= 1 arg)))
#*11111111 :start 1 :end 7) #*10000001)
(equalp (substitute-if-not 0 #'(lambda (arg) (not (= 1 arg)))
#*11111111 :start 1 :end 7 :count 3) #*10001111)
(equalp (substitute-if-not 0 #'(lambda (arg) (not (= 1 arg)))
#*11111111 :start 1 :end 7 :count 3 :from-end t)
#*11110001)
(equalp (substitute-if-not 1 #'(lambda (arg) (not (= 1 arg)))
#*10101010
:start 1 :end 7 :count 3 :from-end t
:key #'(lambda (x) (if (zerop x) 1 0)))
#*11111110)
(equalp (substitute-if-not 1 #'(lambda (arg) (not (>= 1 arg)))
#*10101010
:start 1 :end 7 :count 3 :from-end t
:key #'(lambda (x) (if (zerop x) 1 0)))
#*10101110)
(equal (nsubstitute 'a 'x (copy-seq '(x y z))) '(a y z))
(equal (nsubstitute 'b 'y (copy-seq '(x y z))) '(x b z))
(equal (nsubstitute 'c 'z (copy-seq '(x y z))) '(x y c))
(equal (nsubstitute 'a 'p (copy-seq '(x y z))) '(x y z))
(equal (nsubstitute 'a 'x (copy-seq '())) '())
(equal (nsubstitute #\x #\b (copy-seq '(#\a #\b #\c #\d #\e)) :test #'char<)
'(#\a #\b #\x #\x #\x))
(equal (nsubstitute #\x #\b (copy-seq '(#\a #\b #\c #\d #\e))
:test-not (complement #'char<))
'(#\a #\b #\x #\x #\x))
(equal (nsubstitute '(a) 'x (copy-seq '((x) (y) (z))) :key #'car)
'((a) (y) (z)))
(equal (nsubstitute 'c 'b (copy-seq '(a b a b a b a b))) '(a c a c a c a c))
(equal (nsubstitute 'a 'b (copy-seq '(b b b))) '(a a a))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)))
'(a z b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count nil)
'(a z b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count 0)
'(a x b x c x d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count -100)
'(a x b x c x d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count 1)
'(a z b x c x d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count 2)
'(a z b z c x d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count 3)
'(a z b z c z d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count 4)
'(a z b z c z d z e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count 5)
'(a z b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count 6)
'(a z b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f)) :count 7)
'(a z b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count nil :from-end t)
'(a z b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count 0 :from-end t)
'(a x b x c x d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count -100 :from-end t)
'(a x b x c x d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count 1 :from-end t)
'(a x b x c x d x e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count 2 :from-end t)
'(a x b x c x d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count 3 :from-end t)
'(a x b x c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count 4 :from-end t)
'(a x b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count 5 :from-end t)
'(a z b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count 6 :from-end t)
'(a z b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:count 7 :from-end t)
'(a z b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:start 2 :count 1)
'(a x b z c x d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:start 2 :end nil :count 1)
'(a x b z c x d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:start 2 :end 6 :count 100)
'(a x b z c z d x e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:start 2 :end 11 :count 100)
'(a x b z c z d z e z f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:start 2 :end 8 :count 10)
'(a x b z c z d z e x f))
(equal (nsubstitute 'z 'x (copy-seq '(a x b x c x d x e x f))
:start 2 :end 8 :count 2 :from-end t)
'(a x b x c z d z e x f))
(equal (nsubstitute #\z #\c (copy-seq '(#\a #\b #\c #\d #\e #\f))
:test #'char<)
'(#\a #\b #\c #\z #\z #\z))
(equal (nsubstitute #\z #\c (copy-seq '(#\a #\b #\c #\d #\e #\f))
:test-not (complement #'char<))
'(#\a #\b #\c #\z #\z #\z))
(equal (nsubstitute "peace" "war" (copy-seq '("love" "hate" "war" "peace"))
:test #'equal)
'("love" "hate" "peace" "peace"))
(equal (nsubstitute "peace" "war" (copy-seq '("love" "hate" "war" "peace"))
:test-not (complement #'equal))
'("love" "hate" "peace" "peace"))
(equal (nsubstitute "peace" "war" (copy-seq '("war" "War" "WAr" "WAR"))
:test #'string-equal)
'("peace" "peace" "peace" "peace"))
(equal (nsubstitute "peace" "war" (copy-seq '("war" "War" "WAr" "WAR"))
:test-not (complement #'string-equal))
'("peace" "peace" "peace" "peace"))
(equal (nsubstitute "peace" "WAR" (copy-seq '("war" "War" "WAr" "WAR"))
:test #'string=)
'("war" "War" "WAr" "peace"))
(equal (nsubstitute "peace" "WAR" (copy-seq '("war" "War" "WAr" "WAR"))
:test-not (complement #'string=))
'("war" "War" "WAr" "peace"))
(equal (nsubstitute "peace" "WAR" (copy-seq '("war" "War" "WAr" "WAR"))
:test #'string=
:key #'string-upcase)
'("peace" "peace" "peace" "peace"))
(equal (nsubstitute "peace" "WAR" (copy-seq '("war" "War" "WAr" "WAR"))
:test-not (complement #'string=)
:key #'string-upcase)
'("peace" "peace" "peace" "peace"))
(equal (nsubstitute "peace" "WAR" (copy-seq '("war" "War" "WAr" "WAR"))
:start 1
:end 2
:test #'string=
:key #'string-upcase)
'("war" "peace" "WAr" "WAR"))
(equal (nsubstitute "peace" "WAR" (copy-seq '("war" "War" "WAr" "WAR"))
:start 1
:end 2
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "WAr" "WAR"))
(equal (nsubstitute "peace" "WAR" (copy-seq '("war" "War" "WAr" "WAR"))
:start 1
:end nil
:test #'string=
:key #'string-upcase)
'("war" "peace" "peace" "peace"))
(equal (nsubstitute "peace" "WAR" (copy-seq '("war" "War" "WAr" "WAR"))
:start 1
:end nil
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace"))
(equal (nsubstitute "peace" "war" (copy-seq '("war" "War" "WAr" "WAR"))
:test #'string=
:key #'string-upcase)
'("war" "War" "WAr" "WAR"))
(equal (nsubstitute "peace" "war" (copy-seq '("war" "War" "WAr" "WAR"))
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "War" "WAr" "WAR"))
(equal (nsubstitute "peace" "WAR"
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 1
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (nsubstitute "peace" "WAR"
(copy-seq '("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 2
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equal (nsubstitute "peace" "WAR"
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 2
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equal (nsubstitute "peace" "WAR"
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 0
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (nsubstitute "peace" "WAR"
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count -2
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (nsubstitute "peace" "WAR"
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count nil
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (nsubstitute "peace" "WAR"
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 6
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (nsubstitute "peace" "WAR"
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 7
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (nsubstitute "peace" "WAR"
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 100
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (nsubstitute 'a 'x (copy-seq #(x y z))) #(a y z))
(equalp (nsubstitute 'b 'y (copy-seq #(x y z))) #(x b z))
(equalp (nsubstitute 'c 'z (copy-seq #(x y z))) #(x y c))
(equalp (nsubstitute 'a 'p (copy-seq #(x y z))) #(x y z))
(equalp (nsubstitute 'a 'x (copy-seq #())) #())
(equalp (nsubstitute #\x #\b (copy-seq #(#\a #\b #\c #\d #\e)) :test #'char<)
#(#\a #\b #\x #\x #\x))
(equalp (nsubstitute #\x #\b (copy-seq #(#\a #\b #\c #\d #\e))
:test-not (complement #'char<))
#(#\a #\b #\x #\x #\x))
(equalp (nsubstitute '(a) 'x (copy-seq #((x) (y) (z))) :key #'car)
#((a) (y) (z)))
(equalp (nsubstitute 'c 'b (copy-seq #(a b a b a b a b))) #(a c a c a c a c))
(equalp (nsubstitute 'a 'b (copy-seq #(b b b))) #(a a a))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)))
#(a z b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count nil)
#(a z b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count 0)
#(a x b x c x d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count -100)
#(a x b x c x d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count 1)
#(a z b x c x d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count 2)
#(a z b z c x d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count 3)
#(a z b z c z d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count 4)
#(a z b z c z d z e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count 5)
#(a z b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count 6)
#(a z b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f)) :count 7)
#(a z b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count nil :from-end t)
#(a z b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count 0 :from-end t)
#(a x b x c x d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count -100 :from-end t)
#(a x b x c x d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count 1 :from-end t)
#(a x b x c x d x e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count 2 :from-end t)
#(a x b x c x d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count 3 :from-end t)
#(a x b x c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count 4 :from-end t)
#(a x b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count 5 :from-end t)
#(a z b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count 6 :from-end t)
#(a z b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:count 7 :from-end t)
#(a z b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:start 2 :count 1)
#(a x b z c x d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:start 2 :end nil :count 1)
#(a x b z c x d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:start 2 :end 6 :count 100)
#(a x b z c z d x e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:start 2 :end 11 :count 100)
#(a x b z c z d z e z f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:start 2 :end 8 :count 10)
#(a x b z c z d z e x f))
(equalp (nsubstitute 'z 'x (copy-seq #(a x b x c x d x e x f))
:start 2 :end 8 :count 2 :from-end t)
#(a x b x c z d z e x f))
(equalp (nsubstitute #\z #\c (copy-seq #(#\a #\b #\c #\d #\e #\f))
:test #'char<)
#(#\a #\b #\c #\z #\z #\z))
(equalp (nsubstitute #\z #\c (copy-seq #(#\a #\b #\c #\d #\e #\f))
:test-not (complement #'char<))
#(#\a #\b #\c #\z #\z #\z))
(equalp (nsubstitute "peace" "war" (copy-seq #("love" "hate" "war" "peace"))
:test #'equal)
#("love" "hate" "peace" "peace"))
(equalp (nsubstitute "peace" "war" (copy-seq #("love" "hate" "war" "peace"))
:test-not (complement #'equal))
#("love" "hate" "peace" "peace"))
(equalp (nsubstitute "peace" "war" (copy-seq #("war" "War" "WAr" "WAR"))
:test #'string-equal)
#("peace" "peace" "peace" "peace"))
(equalp (nsubstitute "peace" "war" (copy-seq #("war" "War" "WAr" "WAR"))
:test-not (complement #'string-equal))
#("peace" "peace" "peace" "peace"))
(equalp (nsubstitute "peace" "WAR" (copy-seq #("war" "War" "WAr" "WAR"))
:test #'string=)
#("war" "War" "WAr" "peace"))
(equalp (nsubstitute "peace" "WAR" (copy-seq #("war" "War" "WAr" "WAR"))
:test-not (complement #'string=))
#("war" "War" "WAr" "peace"))
(equalp (nsubstitute "peace" "WAR" (copy-seq #("war" "War" "WAr" "WAR"))
:test #'string=
:key #'string-upcase)
#("peace" "peace" "peace" "peace"))
(equalp (nsubstitute "peace" "WAR" (copy-seq #("war" "War" "WAr" "WAR"))
:test-not (complement #'string=)
:key #'string-upcase)
#("peace" "peace" "peace" "peace"))
(equalp (nsubstitute "peace" "WAR" (copy-seq #("war" "War" "WAr" "WAR"))
:start 1
:end 2
:test #'string=
:key #'string-upcase)
#("war" "peace" "WAr" "WAR"))
(equalp (nsubstitute "peace" "WAR" (copy-seq #("war" "War" "WAr" "WAR"))
:start 1
:end 2
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "WAr" "WAR"))
(equalp (nsubstitute "peace" "WAR" (copy-seq #("war" "War" "WAr" "WAR"))
:start 1
:end nil
:test #'string=
:key #'string-upcase)
#("war" "peace" "peace" "peace"))
(equalp (nsubstitute "peace" "WAR" (copy-seq #("war" "War" "WAr" "WAR"))
:start 1
:end nil
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace"))
(equalp (nsubstitute "peace" "war" (copy-seq #("war" "War" "WAr" "WAR"))
:test #'string=
:key #'string-upcase)
#("war" "War" "WAr" "WAR"))
(equalp (nsubstitute "peace" "war" (copy-seq #("war" "War" "WAr" "WAR"))
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "War" "WAr" "WAR"))
(equalp (nsubstitute "peace" "WAR"
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 1
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (nsubstitute "peace" "WAR"
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 2
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equalp (nsubstitute "peace" "WAR"
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 2
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equalp (nsubstitute "peace" "WAR"
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 0
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (nsubstitute "peace" "WAR"
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count -2
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (nsubstitute "peace" "WAR"
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count nil
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (nsubstitute "peace" "WAR"
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 6
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (nsubstitute "peace" "WAR"
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 7
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (nsubstitute "peace" "WAR"
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 100
:from-end t
:test-not (complement #'string=)
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(string= (nsubstitute #\A #\a (copy-seq "abcabc")) "AbcAbc")
(string= (nsubstitute #\A #\a (copy-seq "")) "")
(string= (nsubstitute #\A #\a (copy-seq "xyz")) "xyz")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa") :start 5 :end nil)
"aaaaaAAAAA")
(string= (nsubstitute #\x #\5 (copy-seq "0123456789") :test #'char<)
"012345xxxx")
(string= (nsubstitute #\x #\5 (copy-seq "0123456789") :test #'char>)
"xxxxx56789")
(string= (nsubstitute #\x #\D (copy-seq "abcdefg")
:key #'char-upcase
:test #'char>)
"xxxdefg")
(string= (nsubstitute #\x #\D (copy-seq "abcdefg")
:start 1
:end 2
:key #'char-upcase
:test #'char>)
"axcdefg")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa") :count 2) "AAaaaaaaaa")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa") :count -1) "aaaaaaaaaa")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa") :count 0) "aaaaaaaaaa")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa") :count nil) "AAAAAAAAAA")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa") :count 100) "AAAAAAAAAA")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa") :count 9) "AAAAAAAAAa")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa") :count 9 :from-end t)
"aAAAAAAAAA")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa")
:start 2
:end 8
:count 3)
"aaAAAaaaaa")
(string= (nsubstitute #\A #\a (copy-seq "aaaaaaaaaa")
:start 2
:end 8
:from-end t
:count 3)
"aaaaaAAAaa")
(string= (nsubstitute #\x #\A (copy-seq "aaaaaaaaaa")
:start 2
:end 8
:from-end t
:count 3)
"aaaaaaaaaa")
(string= (nsubstitute #\X #\A (copy-seq "aaaaaaaaaa")
:start 2
:end 8
:from-end t
:key #'char-upcase
:count 3)
"aaaaaXXXaa")
(string= (nsubstitute #\X #\D (copy-seq "abcdefghij")
:start 2
:end 8
:from-end t
:key #'char-upcase
:test #'char<
:count 3)
"abcdeXXXij")
(equalp (nsubstitute 0 1 (copy-seq #*1111)) #*0000)
(equalp (nsubstitute 0 1 (copy-seq #*1111) :start 1 :end nil) #*1000)
(equalp (nsubstitute 0 1 (copy-seq #*1111) :start 1 :end 3) #*1001)
(equalp (nsubstitute 0 1 (copy-seq #*11111111) :start 1 :end 7) #*10000001)
(equalp (nsubstitute 0 1 (copy-seq #*11111111) :start 1 :end 7 :count 3)
#*10001111)
(equalp (nsubstitute 0 1 (copy-seq #*11111111)
:start 1 :end 7 :count 3 :from-end t)
#*11110001)
(equalp (nsubstitute 1 1 (copy-seq #*10101010)
:start 1 :end 7 :count 3 :from-end t
:key #'(lambda (x) (if (zerop x) 1 0)))
#*11111110)
(equalp (nsubstitute 1 1 (copy-seq #*10101010)
:start 1 :end 7 :count 3 :from-end t
:key #'(lambda (x) (if (zerop x) 1 0))
:test #'>=)
#*10101110)
(equal (nsubstitute-if 'a #'(lambda (arg) (eq arg 'x)) (copy-seq '(x y z)))
'(a y z))
(equal (nsubstitute-if 'b #'(lambda (arg) (eq arg 'y)) (copy-seq '(x y z)))
'(x b z))
(equal (nsubstitute-if 'c #'(lambda (arg) (eq arg 'z)) (copy-seq '(x y z)))
'(x y c))
(equal (nsubstitute-if 'a #'(lambda (arg) (eq arg 'p)) (copy-seq '(x y z)))
'(x y z))
(equal (nsubstitute-if 'a #'(lambda (arg) (eq arg 'x)) (copy-seq '()))
'())
(equal (nsubstitute-if #\x #'(lambda (arg) (char< #\b arg))
(copy-seq '(#\a #\b #\c #\d #\e)))
'(#\a #\b #\x #\x #\x))
(equal (nsubstitute-if '(a) #'(lambda (arg) (eq arg 'x))
(copy-seq '((x) (y) (z))) :key #'car)
'((a) (y) (z)))
(equal (nsubstitute-if 'c #'(lambda (arg) (eq arg 'b))
(copy-seq '(a b a b a b a b))) '(a c a c a c a c))
(equal (nsubstitute-if 'a #'(lambda (arg) (eq arg 'b))
(copy-seq '(b b b))) '(a a a))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)))
'(a z b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count nil)
'(a z b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count 0)
'(a x b x c x d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count -100)
'(a x b x c x d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count 1)
'(a z b x c x d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count 2)
'(a z b z c x d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count 3)
'(a z b z c z d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count 4)
'(a z b z c z d z e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count 5)
'(a z b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count 6)
'(a z b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count 7)
'(a z b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:count nil :from-end t)
'(a z b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :count 0 :from-end t)
'(a x b x c x d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:count -100 :from-end t)
'(a x b x c x d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:count 1 :from-end t)
'(a x b x c x d x e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:count 2 :from-end t)
'(a x b x c x d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:count 3 :from-end t)
'(a x b x c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:count 4 :from-end t)
'(a x b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:count 5 :from-end t)
'(a z b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:count 6 :from-end t)
'(a z b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:count 7 :from-end t)
'(a z b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f)) :start 2 :count 1)
'(a x b z c x d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:start 2 :end nil :count 1)
'(a x b z c x d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:start 2 :end 6 :count 100)
'(a x b z c z d x e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:start 2 :end 11 :count 100)
'(a x b z c z d z e z f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:start 2 :end 8 :count 10)
'(a x b z c z d z e x f))
(equal (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq '(a x b x c x d x e x f))
:start 2 :end 8 :count 2 :from-end t)
'(a x b x c z d z e x f))
(equal (nsubstitute-if #\z #'(lambda (arg) (char< #\c arg))
(copy-seq '(#\a #\b #\c #\d #\e #\f)))
'(#\a #\b #\c #\z #\z #\z))
(equal (nsubstitute-if "peace" #'(lambda (arg) (equal "war" arg))
(copy-seq '("love" "hate" "war" "peace")))
'("love" "hate" "peace" "peace"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string-equal "war" arg))
(copy-seq '("war" "War" "WAr" "WAR")))
'("peace" "peace" "peace" "peace"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq '("war" "War" "WAr" "WAR"))
:key #'string-upcase)
'("peace" "peace" "peace" "peace"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq '("war" "War" "WAr" "WAR"))
:start 1
:end 2
:key #'string-upcase)
'("war" "peace" "WAr" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq '("war" "War" "WAr" "WAR"))
:start 1
:end nil
:key #'string-upcase)
'("war" "peace" "peace" "peace"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "war" arg))
(copy-seq '("war" "War" "WAr" "WAR"))
:key #'string-upcase)
'("war" "War" "WAr" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 1
:key #'string-upcase)
'("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 2
:key #'string-upcase)
'("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 2
:from-end t
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 0
:from-end t
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count -2
:from-end t
:key #'string-upcase)
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count nil
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 6
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 7
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equal (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
'("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 100
:from-end t
:key #'string-upcase)
'("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (nsubstitute-if 'a #'(lambda (arg) (eq arg 'x)) (copy-seq #(x y z)))
#(a y z))
(equalp (nsubstitute-if 'b #'(lambda (arg) (eq arg 'y)) (copy-seq #(x y z)))
#(x b z))
(equalp (nsubstitute-if 'c #'(lambda (arg) (eq arg 'z)) (copy-seq #(x y z)))
#(x y c))
(equalp (nsubstitute-if 'a #'(lambda (arg) (eq arg 'p)) (copy-seq #(x y z)))
#(x y z))
(equalp (nsubstitute-if 'a #'(lambda (arg) (eq arg 'x)) (copy-seq #())) #())
(equalp (nsubstitute-if #\x #'(lambda (arg) (char< #\b arg))
(copy-seq #(#\a #\b #\c #\d #\e)))
#(#\a #\b #\x #\x #\x))
(equalp (nsubstitute-if '(a) #'(lambda (arg) (eq arg 'x))
(copy-seq #((x) (y) (z))) :key #'car)
#((a) (y) (z)))
(equalp (nsubstitute-if 'c #'(lambda (arg) (eq arg 'b))
(copy-seq #(a b a b a b a b))) #(a c a c a c a c))
(equalp (nsubstitute-if 'a #'(lambda (arg) (eq arg 'b))
(copy-seq #(b b b))) #(a a a))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)))
#(a z b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count nil)
#(a z b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count 0)
#(a x b x c x d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count -100)
#(a x b x c x d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count 1)
#(a z b x c x d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count 2)
#(a z b z c x d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count 3)
#(a z b z c z d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count 4)
#(a z b z c z d z e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count 5)
#(a z b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count 6)
#(a z b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f)) :count 7)
#(a z b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count nil :from-end t)
#(a z b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count 0 :from-end t)
#(a x b x c x d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count -100 :from-end t)
#(a x b x c x d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count 1 :from-end t)
#(a x b x c x d x e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count 2 :from-end t)
#(a x b x c x d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count 3 :from-end t)
#(a x b x c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count 4 :from-end t)
#(a x b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count 5 :from-end t)
#(a z b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count 6 :from-end t)
#(a z b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:count 7 :from-end t)
#(a z b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:start 2 :count 1)
#(a x b z c x d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:start 2 :end nil :count 1)
#(a x b z c x d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:start 2 :end 6 :count 100)
#(a x b z c z d x e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:start 2 :end 11 :count 100)
#(a x b z c z d z e z f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:start 2 :end 8 :count 10)
#(a x b z c z d z e x f))
(equalp (nsubstitute-if 'z #'(lambda (arg) (eq arg 'x))
(copy-seq #(a x b x c x d x e x f))
:start 2 :end 8 :count 2 :from-end t)
#(a x b x c z d z e x f))
(equalp (nsubstitute-if #\z #'(lambda (arg) (char< #\c arg))
(copy-seq #(#\a #\b #\c #\d #\e #\f)))
#(#\a #\b #\c #\z #\z #\z))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (equal "war" arg))
(copy-seq #("love" "hate" "war" "peace")))
#("love" "hate" "peace" "peace"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string-equal "war" arg))
(copy-seq #("war" "War" "WAr" "WAR")))
#("peace" "peace" "peace" "peace"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq #("war" "War" "WAr" "WAR"))
:key #'string-upcase)
#("peace" "peace" "peace" "peace"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq #("war" "War" "WAr" "WAR"))
:start 1
:end 2
:key #'string-upcase)
#("war" "peace" "WAr" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq #("war" "War" "WAr" "WAR"))
:start 1
:end nil
:key #'string-upcase)
#("war" "peace" "peace" "peace"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "war" arg))
(copy-seq #("war" "War" "WAr" "WAR"))
:key #'string-upcase)
#("war" "War" "WAr" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 1
:key #'string-upcase)
#("war" "peace" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 2
:key #'string-upcase)
#("war" "peace" "peace" "WAR" "war" "War" "WAr" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 2
:from-end t
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "peace" "peace" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 0
:from-end t
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count -2
:from-end t
:key #'string-upcase)
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count nil
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 6
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 7
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(equalp (nsubstitute-if "peace" #'(lambda (arg) (string= "WAR" arg))
(copy-seq
#("war" "War" "WAr" "WAR" "war" "War" "WAr" "WAR"))
:start 1
:end 7
:count 100
:from-end t
:key #'string-upcase)
#("war" "peace" "peace" "peace" "peace" "peace" "peace" "WAR"))
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "abcabc")) "AbcAbc")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg)) (copy-seq "")) "")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg)) (copy-seq "xyz"))
"xyz")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa") :start 5 :end nil)
"aaaaaAAAAA")
(string= (nsubstitute-if #\x #'(lambda (arg) (char< #\5 arg))
(copy-seq "0123456789")) "012345xxxx")
(string= (nsubstitute-if #\x #'(lambda (arg) (char> #\5 arg))
(copy-seq "0123456789")) "xxxxx56789")
(string= (nsubstitute-if #\x #'(lambda (arg) (char> #\D arg))
(copy-seq "abcdefg")
:key #'char-upcase)
"xxxdefg")
(string= (nsubstitute-if #\x #'(lambda (arg) (char> #\D arg))
(copy-seq "abcdefg")
:start 1
:end 2
:key #'char-upcase)
"axcdefg")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa") :count 2) "AAaaaaaaaa")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa") :count -1) "aaaaaaaaaa")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa") :count 0) "aaaaaaaaaa")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa") :count nil) "AAAAAAAAAA")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa") :count 100) "AAAAAAAAAA")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa") :count 9) "AAAAAAAAAa")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa") :count 9 :from-end t)
"aAAAAAAAAA")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa")
:start 2
:end 8
:count 3)
"aaAAAaaaaa")
(string= (nsubstitute-if #\A #'(lambda (arg) (eql #\a arg))
(copy-seq "aaaaaaaaaa")
:start 2
:end 8
:from-end t
:count 3)
"aaaaaAAAaa")
(string= (nsubstitute-if #\x #'(lambda (arg) (eql #\A arg))
(copy-seq "aaaaaaaaaa")
:start 2
:end 8
:from-end t
:count 3)
"aaaaaaaaaa")
(string= (nsubstitute-if #\X #'(lambda (arg) (eql #\A arg))
(copy-seq "aaaaaaaaaa")
:start 2
:end 8
:from-end t
:key #'char-upcase
:count 3)
"aaaaaXXXaa")
(string= (nsubstitute-if #\X #'(lambda (arg) (char< #\D arg))
(copy-seq "abcdefghij")
:start 2
:end 8
:from-end t
:key #'char-upcase
:count 3)
"abcdeXXXij")
(equalp (nsubstitute-if 0 #'(lambda (arg) (= 1 arg)) (copy-seq #*1111)) #*0000)
(equalp (nsubstitute-if 0 #'(lambda (arg) (= 1 arg))
(copy-seq #*1111) :start 1 :end nil) #*1000)
(equalp (nsubstitute-if 0 #'(lambda (arg) (= 1 arg))
(copy-seq #*1111) :start 1 :end 3) #*1001)
(equalp (nsubstitute-if 0 #'(lambda (arg) (= 1 arg))
(copy-seq #*11111111) :start 1 :end 7) #*10000001)
(equalp (nsubstitute-if 0 #'(lambda (arg) (= 1 arg))
(copy-seq #*11111111) :start 1 :end 7 :count 3)
#*10001111)
(equalp (nsubstitute-if 0 #'(lambda (arg) (= 1 arg))
(copy-seq #*11111111)
:start 1 :end 7 :count