Support for user-extensible sequences, adapted from SBCL.

parent 981292ed
......@@ -119,7 +119,6 @@ public class BuiltInClass extends LispClass
public static final BuiltInClass READTABLE = addClass(Symbol.READTABLE);
public static final BuiltInClass REAL = addClass(Symbol.REAL);
public static final BuiltInClass RESTART = addClass(Symbol.RESTART);
public static final BuiltInClass SEQUENCE = addClass(Symbol.SEQUENCE);
public static final BuiltInClass SIMPLE_ARRAY = addClass(Symbol.SIMPLE_ARRAY);
public static final BuiltInClass SIMPLE_BASE_STRING = addClass(Symbol.SIMPLE_BASE_STRING);
public static final BuiltInClass SIMPLE_BIT_VECTOR = addClass(Symbol.SIMPLE_BIT_VECTOR);
......@@ -139,6 +138,10 @@ public class BuiltInClass extends LispClass
(StructureClass)addClass(Symbol.STRUCTURE_OBJECT,
new StructureClass(Symbol.STRUCTURE_OBJECT, list(CLASS_T)));
public static final SlotClass SEQUENCE =
(SlotClass) addClass(Symbol.SEQUENCE,
new SlotClass(Symbol.SEQUENCE, list(CLASS_T)));
/* All the stream classes below are being defined as structure classes
but won't be available as such until further action is taken:
the 'defstruct' internal administration is missing.
......
......@@ -87,7 +87,7 @@ public final class Cons extends LispObject
if (typeSpecifier == T)
return T;
}
else if (typeSpecifier instanceof BuiltInClass)
else if (typeSpecifier instanceof LispClass)
{
if (typeSpecifier == BuiltInClass.LIST)
return T;
......
......@@ -87,6 +87,8 @@ public final class Lisp
Packages.createPackage("XP");
public static final Package PACKAGE_PRECOMPILER =
Packages.createPackage("PRECOMPILER");
public static final Package PACKAGE_SEQUENCE =
Packages.createPackage("SEQUENCE");
// ### nil
......@@ -134,6 +136,7 @@ public final class Lisp
PACKAGE_PRECOMPILER.usePackage(PACKAGE_CL);
PACKAGE_PRECOMPILER.usePackage(PACKAGE_EXT);
PACKAGE_PRECOMPILER.usePackage(PACKAGE_SYS);
PACKAGE_SEQUENCE.usePackage(PACKAGE_CL);
}
// End-of-file marker.
......
......@@ -462,7 +462,7 @@ public final class Primitives {
private static final Primitive LENGTH = new pf_length();
private static final class pf_length extends Primitive {
pf_length() {
super(Symbol.LENGTH, "sequence");
super("%LENGTH", PACKAGE_SYS, false, "sequence");
}
@Override
......@@ -475,7 +475,7 @@ public final class Primitives {
private static final Primitive ELT = new pf_elt();
private static final class pf_elt extends Primitive {
pf_elt() {
super(Symbol.ELT, "sequence index");
super("%ELT", PACKAGE_SYS, false, "sequence index");
}
@Override
......@@ -4159,7 +4159,7 @@ for (LispObject a : args)
}
};
// ### call-count
// ### hot-count
private static final Primitive HOT_COUNT = new pf_hot_count();
private static final class pf_hot_count extends Primitive {
pf_hot_count() {
......@@ -4172,7 +4172,7 @@ for (LispObject a : args)
}
};
// ### set-call-count
// ### set-hot-count
private static final Primitive SET_HOT_COUNT = new pf_set_hot_count();
private static final class pf_set_hot_count extends Primitive {
pf_set_hot_count() {
......@@ -4253,7 +4253,7 @@ for (LispObject a : args)
private static final Primitive SUBSEQ = new pf_subseq();
private static final class pf_subseq extends Primitive {
pf_subseq() {
super(Symbol.SUBSEQ, "sequence start &optional end");
super(PACKAGE_SYS.intern("%SUBSEQ"), "sequence start &optional end");
}
@Override
......@@ -4420,7 +4420,7 @@ for (LispObject a : args)
public static final Primitive NREVERSE = new pf_nreverse();
private static final class pf_nreverse extends Primitive {
pf_nreverse() {
super(Symbol.NREVERSE, "sequence");
super("%NREVERSE", PACKAGE_SYS, false, "sequence");
}
@Override
......@@ -4475,7 +4475,7 @@ for (LispObject a : args)
private static final Primitive REVERSE = new pf_reverse();
private static final class pf_reverse extends Primitive {
pf_reverse() {
super(Symbol.REVERSE, "sequence");
super("%reverse", PACKAGE_SYS, false, "sequence");
}
@Override
......
......@@ -83,8 +83,10 @@
(autoload '(assoc assoc-if assoc-if-not rassoc rassoc-if rassoc-if-not
acons pairlis copy-alist)
"assoc")
(autoload-macro 'sequence::seq-dispatch "extensible-sequences-base")
(autoload '(mapcan mapl maplist mapcon) "map1")
(autoload 'make-sequence)
;(autoload 'sequence::fill "extensible-sequences")
(autoload '(copy-seq fill replace))
(autoload '(map map-into))
(autoload 'reduce)
......
......@@ -130,6 +130,22 @@
(sys::%format t "~A~%" condition)
(ext:quit))
;;Redefined in extensible-sequences.lisp
(defun length (sequence)
(%length sequence))
(defun elt (sequence index)
(%elt sequence index))
(defun subseq (sequence start &optional end)
(sys::%subseq sequence start end))
(defun reverse (sequence)
(sys::%reverse sequence))
(defun nreverse (sequence)
(sys::%nreverse sequence))
(load-system-file "autoloads")
(load-system-file "early-defuns")
(load-system-file "backquote")
......@@ -161,11 +177,12 @@
(load-system-file "typep")
(load-system-file "signal")
(load-system-file "list")
(load-system-file "require")
(load-system-file "extensible-sequences-base")
(load-system-file "sequences")
(load-system-file "error")
(load-system-file "defpackage")
(load-system-file "define-modify-macro")
(load-system-file "require")
(load-system-file "defstruct")
;; The actual stream and system-stream classes
......
......@@ -2393,5 +2393,16 @@
;; FIXME
(defgeneric function-keywords (method))
(defgeneric class-prototype (class))
(defmethod class-prototype :before (class)
(unless (class-finalized-p class)
(error "~@<~S is not finalized.~:@>" class)))
(defmethod class-prototype ((class standard-class))
(allocate-instance class))
(defmethod class-prototype ((class structure-class))
(allocate-instance class))
(provide 'clos)
......@@ -102,6 +102,8 @@
(load (do-compile "compiler-macro.lisp"))
(load (do-compile "opcodes.lisp"))
(load (do-compile "setf.lisp"))
(load (do-compile "extensible-sequences-base.lisp"))
(load (do-compile "require.lisp"))
(load (do-compile "substitute.lisp"))
(load (do-compile "clos.lisp"))
;; Order matters for these files.
......@@ -173,6 +175,7 @@
"enough-namestring.lisp"
"ensure-directories-exist.lisp"
"error.lisp"
"extensible-sequences.lisp"
"featurep.lisp"
"fdefinition.lisp"
"fill.lisp"
......@@ -230,7 +233,6 @@
"remove-duplicates.lisp"
"remove.lisp"
"replace.lisp"
"require.lisp"
"restart.lisp"
"revappend.lisp"
"rotatef.lisp"
......
......@@ -2573,7 +2573,7 @@ The field type of the object is specified by OBJ-REF."
(COMPLEXP "COMPLEXP")
(DENOMINATOR "DENOMINATOR")
(FIRST "car")
(LENGTH "LENGTH")
(SYS::%LENGTH "LENGTH")
(NREVERSE "nreverse")
(NUMERATOR "NUMERATOR")
(REST "cdr")
......@@ -8588,7 +8588,6 @@ We need more thought here.
(with-saved-compiler-policy
;; Pass 1.
(p1-compiland compiland)
;; *all-variables* doesn't contain variables which
;; are in an enclosing lexical environment (variable-environment)
;; so we don't need to filter them out
......@@ -8896,7 +8895,7 @@ to derive a Java class name from."
(install-p2-handler 'gethash1 'p2-gethash)
(install-p2-handler 'go 'p2-go)
(install-p2-handler 'if 'p2-if)
(install-p2-handler 'length 'p2-length)
(install-p2-handler 'sys::%length 'p2-length)
(install-p2-handler 'list 'p2-list)
(install-p2-handler 'sys::backq-list 'p2-list)
(install-p2-handler 'list* 'p2-list*)
......
......@@ -51,6 +51,7 @@
(setf (schar result i) (elt seq j))
(incf i)))))))
;;It uses make-sequence: it should already be user-extensible as-is
(defun concatenate (result-type &rest sequences)
(case result-type
(LIST
......
......@@ -29,6 +29,8 @@
;;; obligated to do so. If you do not wish to do so, delete this
;;; exception statement from your version.
(require "EXTENSIBLE-SEQUENCES-BASE")
(in-package "SYSTEM")
;; From CMUCL.
......@@ -51,6 +53,8 @@
result)))))
(defun copy-seq (sequence)
(if (listp sequence)
(list-copy-seq sequence)
(vector-copy-seq sequence (type-of sequence))))
"Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ."
(sequence::seq-dispatch sequence
(list-copy-seq sequence)
(vector-copy-seq sequence (type-of sequence))
(sequence:copy-seq sequence)))
\ No newline at end of file
......@@ -31,6 +31,8 @@
(in-package "COMMON-LISP")
(require "EXTENSIBLE-SEQUENCES-BASE")
;;; From CMUCL.
(defmacro vector-count-if (not-p from-end-p predicate sequence)
......@@ -56,7 +58,7 @@
(,(if not-p 'unless 'when) ,pred
(setq count (1+ count)))))))
(defun count (item sequence &key from-end (test #'eql test-p) (test-not nil test-not-p)
(defun count (item sequence &rest args &key from-end (test #'eql test-p) (test-not nil test-not-p)
(start 0) end key)
(when (and test-p test-not-p)
(error "test and test-not both supplied"))
......@@ -67,32 +69,35 @@
(not (funcall test-not item x)))
(lambda (x)
(funcall test item x)))))
(if (listp sequence)
(if from-end
(list-count-if nil t %test sequence)
(list-count-if nil nil %test sequence))
(if from-end
(vector-count-if nil t %test sequence)
(vector-count-if nil nil %test sequence))))))
(sequence::seq-dispatch sequence
(if from-end
(list-count-if nil t %test sequence)
(list-count-if nil nil %test sequence))
(if from-end
(vector-count-if nil t %test sequence)
(vector-count-if nil nil %test sequence))
(apply #'sequence:count item sequence args)))))
(defun count-if (test sequence &key from-end (start 0) end key)
(defun count-if (test sequence &rest args &key from-end (start 0) end key)
(let* ((length (length sequence))
(end (or end length)))
(if (listp sequence)
(sequence::seq-dispatch sequence
(if from-end
(list-count-if nil t test sequence)
(list-count-if nil nil test sequence))
(if from-end
(vector-count-if nil t test sequence)
(vector-count-if nil nil test sequence)))))
(vector-count-if nil nil test sequence))
(apply #'sequence:count-if test sequence args))))
(defun count-if-not (test sequence &key from-end (start 0) end key)
(defun count-if-not (test sequence &rest args &key from-end (start 0) end key)
(let* ((length (length sequence))
(end (or end length)))
(if (listp sequence)
(sequence::seq-dispatch sequence
(if from-end
(list-count-if t t test sequence)
(list-count-if t nil test sequence))
(if from-end
(vector-count-if t t test sequence)
(vector-count-if t nil test sequence)))))
(vector-count-if t nil test sequence))
(apply #'sequence:count-if-not test sequence args))))
......@@ -31,6 +31,8 @@
(in-package "SYSTEM")
(require "EXTENSIBLE-SEQUENCES-BASE")
;;; From CMUCL.
(defun list-delete-duplicates* (list test test-not key from-end start end)
......@@ -79,10 +81,10 @@
:end (if from-end jndex end) :test-not test-not)
(setq jndex (1+ jndex)))))
(defun delete-duplicates (sequence &key (test #'eql) test-not (start 0) from-end
end key)
(if (listp sequence)
(if sequence
(list-delete-duplicates* sequence test test-not key from-end start end))
(vector-delete-duplicates* sequence test test-not key from-end start end)))
(defun delete-duplicates (sequence &rest args &key (test #'eql) test-not
(start 0) from-end end key)
(sequence::seq-dispatch sequence
(if sequence
(list-delete-duplicates* sequence test test-not key from-end start end))
(vector-delete-duplicates* sequence test test-not key from-end start end)
(apply #'sequence:delete-duplicates sequence args)))
......@@ -31,6 +31,8 @@
(in-package "SYSTEM")
(require "EXTENSIBLE-SEQUENCES-BASE")
;;; From CMUCL.
(defmacro real-count (count)
......@@ -133,20 +135,21 @@
(not (funcall test-not item (funcall-key key (car current))))
(funcall test item (funcall-key key (car current))))))
(defun delete (item sequence &key from-end (test #'eql) test-not (start 0)
end count key)
(defun delete (item sequence &rest args &key from-end (test #'eql) test-not
(start 0) end count key)
(when key
(setq key (coerce-to-function key)))
(let* ((length (length sequence))
(end (or end length))
(count (real-count count)))
(if (listp sequence)
(if from-end
(normal-list-delete-from-end)
(normal-list-delete))
(if from-end
(normal-mumble-delete-from-end)
(normal-mumble-delete)))))
(sequence::seq-dispatch sequence
(if from-end
(normal-list-delete-from-end)
(normal-list-delete))
(if from-end
(normal-mumble-delete-from-end)
(normal-mumble-delete))
(apply #'sequence:delete item sequence args))))
(defmacro if-mumble-delete ()
`(mumble-delete
......@@ -164,19 +167,21 @@
'(list-delete-from-end
(funcall predicate (funcall-key key (car current)))))
(defun delete-if (predicate sequence &key from-end (start 0) key end count)
(defun delete-if (predicate sequence &rest args &key from-end (start 0)
key end count)
(when key
(setq key (coerce-to-function key)))
(let* ((length (length sequence))
(end (or end length))
(count (real-count count)))
(if (listp sequence)
(if from-end
(if-list-delete-from-end)
(if-list-delete))
(if from-end
(if-mumble-delete-from-end)
(if-mumble-delete)))))
(sequence::seq-dispatch sequence
(if from-end
(if-list-delete-from-end)
(if-list-delete))
(if from-end
(if-mumble-delete-from-end)
(if-mumble-delete))
(apply #'sequence:delete-if predicate sequence args))))
(defmacro if-not-mumble-delete ()
`(mumble-delete
......@@ -194,16 +199,18 @@
'(list-delete-from-end
(not (funcall predicate (funcall-key key (car current))))))
(defun delete-if-not (predicate sequence &key from-end (start 0) end key count)
(defun delete-if-not (predicate sequence &rest args &key from-end (start 0)
end key count)
(when key
(setq key (coerce-to-function key)))
(let* ((length (length sequence))
(end (or end length))
(count (real-count count)))
(if (listp sequence)
(if from-end
(if-not-list-delete-from-end)
(if-not-list-delete))
(if from-end
(if-not-mumble-delete-from-end)
(if-not-mumble-delete)))))
(sequence::seq-dispatch sequence
(if from-end
(if-not-list-delete-from-end)
(if-not-list-delete))
(if from-end
(if-not-mumble-delete-from-end)
(if-not-mumble-delete))
(apply #'sequence:delete-if-not predicate sequence args))))
;;;This file only defines the minimum set of symbols and operators
;;;that is needed to make standard CL sequence functions refer to generic
;;;functions in the SEQUENCE package, without actually definining those
;;;generic functions and supporting code, which is in extensible-sequences.lisp.
;;;
;;;The rationale for splitting the code this way is that CLOS depends on
;;;some sequence functions, and if those in turn depend on CLOS we have
;;;a circular dependency.
(in-package :sequence)
(shadow '(ELT LENGTH COUNT "COUNT-IF" "COUNT-IF-NOT"
"FIND" "FIND-IF" "FIND-IF-NOT"
"POSITION" "POSITION-IF" "POSITION-IF-NOT"
"SUBSEQ" "COPY-SEQ" "FILL"
"NSUBSTITUTE" "NSUBSTITUTE-IF" "NSUBSTITUTE-IF-NOT"
"SUBSTITUTE" "SUBSTITUTE-IF" "SUBSTITUTE-IF-NOT"
"REPLACE" "REVERSE" "NREVERSE" "REDUCE"
"MISMATCH" "SEARCH"
"DELETE" "DELETE-IF" "DELETE-IF-NOT"
"REMOVE" "REMOVE-IF" "REMOVE-IF-NOT"
"DELETE-DUPLICATES" "REMOVE-DUPLICATES" "SORT" "STABLE-SORT"))
(export '(DOSEQUENCE
MAKE-SEQUENCE-ITERATOR MAKE-SIMPLE-SEQUENCE-ITERATOR
ITERATOR-STEP ITERATOR-ENDP ITERATOR-ELEMENT
ITERATOR-INDEX ITERATOR-COPY
WITH-SEQUENCE-ITERATOR WITH-SEQUENCE-ITERATOR-FUNCTIONS
CANONIZE-TEST CANONIZE-KEY
LENGTH ELT
MAKE-SEQUENCE-LIKE ADJUST-SEQUENCE
COUNT COUNT-IF COUNT-IF-NOT
FIND FIND-IF FIND-IF-NOT
POSITION POSITION-IF POSITION-IF-NOT
SUBSEQ COPY-SEQ FILL
NSUBSTITUTE NSUBSTITUTE-IF NSUBSTITUTE-IF-NOT
SUBSTITUTE SUBSTITUTE-IF SUBSTITUTE-IF-NOT
REPLACE REVERSE NREVERSE REDUCE
MISMATCH SEARCH
DELETE DELETE-IF DELETE-IF-NOT
REMOVE REMOVE-IF REMOVE-IF-NOT
DELETE-DUPLICATES REMOVE-DUPLICATES SORT STABLE-SORT))
;;; Adapted from SBCL
;;; SEQ-DISPATCH does an efficient type-dispatch on the given SEQUENCE.
;;;
;;; FIXME: It might be worth making three cases here, LIST,
;;; SIMPLE-VECTOR, and VECTOR, instead of the current LIST and VECTOR.
;;; It tends to make code run faster but be bigger; some benchmarking
;;; is needed to decide.
(defmacro seq-dispatch
(sequence list-form array-form &optional other-form)
`(if (listp ,sequence)
(let ((,sequence (ext:truly-the list ,sequence)))
(declare (ignorable ,sequence))
,list-form)
,@(if other-form
`((if (arrayp ,sequence)
(let ((,sequence (ext:truly-the vector ,sequence)))
(declare (ignorable ,sequence))
,array-form)
(if (typep ,sequence 'sequence)
,other-form
(error 'type-error
:datum ,sequence :expected-type 'sequence))))
`((let ((,sequence (ext:truly-the vector ,sequence)))
(declare (ignorable ,sequence))
,array-form)))))
(defun %check-generic-sequence-bounds (seq start end)
(let ((length (sequence:length seq)))
(if (<= 0 start (or end length) length)
(or end length)
(sequence-bounding-indices-bad-error seq start end))))
(defun sequence-bounding-indices-bad-error (sequence start end)
(let ((size (length sequence)))
(error "The bounding indices ~S and ~S are bad for a sequence of length ~S"
start end size)))
(defun %set-elt (sequence index value)
(seq-dispatch sequence
(sys::%set-elt sequence index value)
(sys::%set-elt sequence index value)
(setf (sequence:elt sequence index) value)))
(defsetf cl:elt %set-elt)
#|
(error 'bounding-indices-bad-error
:datum (cons start end)
:expected-type `(cons (integer 0 ,size)
(integer ,start ,size))
:object sequence)))|#
(provide "EXTENSIBLE-SEQUENCES-BASE")
\ No newline at end of file
This diff is collapsed.
......@@ -31,6 +31,8 @@
(in-package "SYSTEM")
(require "EXTENSIBLE-SEQUENCES-BASE")
;;; Adapted from CMUCL.
(defun list-fill (sequence item start end)
......@@ -48,11 +50,16 @@
(setf (aref sequence index) item)))
(defun fill (sequence item &key (start 0) end)
(cond ((listp sequence)
(list-fill sequence item start end))
((and (stringp sequence)
(zerop start)
(null end))
(simple-string-fill sequence item))
(t
(vector-fill sequence item start end))))
"Replace the specified elements of SEQUENCE with ITEM."
(sequence::seq-dispatch sequence
(list-fill sequence item start end)
(cond ((and (stringp sequence)
(zerop start)
(null end))
(simple-string-fill sequence item))
(t
(vector-fill sequence item start end)))
(sequence:fill sequence item
:start start
:end (sequence::%check-generic-sequence-bounds
sequence start end))))
\ No newline at end of file
......@@ -31,6 +31,8 @@
(in-package #:system)
(require "EXTENSIBLE-SEQUENCES-BASE")
;;; From CMUCL.
(defmacro vector-locater-macro (sequence body-form return-type)
......@@ -142,12 +144,12 @@
`(list-locater ,item ,sequence :position))
(defun position (item sequence &key from-end (test #'eql) test-not (start 0)
end key)
(if (listp sequence)
(list-position* item sequence from-end test test-not start end key)
(vector-position* item sequence from-end test test-not start end key)))
(defun position (item sequence &rest args &key from-end (test #'eql) test-not
(start 0) end key)
(sequence::seq-dispatch sequence
(list-position* item sequence from-end test test-not start end key)
(vector-position* item sequence from-end test test-not start end key)
(apply #'sequence:position item sequence args)))
(defun list-position* (item sequence from-end test test-not start end key)
(declare (type fixnum start))
......@@ -167,13 +169,14 @@
(defmacro list-position-if (test sequence)
`(list-locater-if ,test ,sequence :position))
(defun position-if (test sequence &key from-end (start 0) key end)
(defun position-if (test sequence &rest args &key from-end (start 0) key end)
(declare (type fixnum start))
(let ((end (or end (length sequence))))
(declare (type fixnum end))
(if (listp sequence)
(list-position-if test sequence)
(vector-position-if test sequence))))
(sequence::seq-dispatch sequence
(list-position-if test sequence)
(vector-position-if test sequence)
(apply #'sequence:position-if test sequence args))))
(defmacro vector-position-if-not (test sequence)
`(vector-locater-if-not ,test ,sequence :position))
......@@ -181,13 +184,14 @@
(defmacro list-position-if-not (test sequence)
`(list-locater-if-not ,test ,sequence :position))
(defun position-if-not (test sequence &key from-end (start 0) key end)
(defun position-if-not (test sequence &rest args &key from-end (start 0) key end)
(declare (type fixnum start))
(let ((end (or end (length sequence))))
(declare (type fixnum end))
(if (listp sequence)
(list-position-if-not test sequence)
(vector-position-if-not test sequence))))
(sequence::seq-dispatch sequence
(list-position-if-not test sequence)
(vector-position-if-not test sequence)
(apply #'sequence:position-if-not test sequence args))))
(defmacro vector-find (item sequence)
`(vector-locater ,item ,sequence :element))
......@@ -207,12 +211,13 @@
(setf test 'eql))
(vector-find item sequence))
(defun find (item sequence &key from-end (test #'eql) test-not (start 0)
end key)
(defun find (item sequence &rest args &key from-end (test #'eql) test-not
(start 0) end key)
(let ((end (check-sequence-bounds sequence start end)))
(if (listp sequence)
(list-find* item sequence from-end test test-not start end key)
(vector-find* item sequence from-end test test-not start end key))))
(sequence::seq-dispatch sequence
(list-find* item sequence from-end test test-not start end key)
(vector-find* item sequence from-end test test-not start end key)
(apply #'sequence:find item sequence args))))
(defmacro vector-find-if (test sequence)
`(vector-locater-if ,test ,sequence :element))
......@@ -220,12 +225,13 @@
(defmacro list-find-if (test sequence)
`(list-locater-if ,test ,sequence :element))
(defun find-if (test sequence &key from-end (start 0) end key)
(defun find-if (test sequence &rest args &key from-end (start 0) end key)
(let ((end (or end (length sequence))))
(declare (type fixnum end))
(if (listp sequence)
(list-find-if test sequence)
(vector-find-if test sequence))))
(sequence::seq-dispatch sequence
(list-find-if test sequence)
(vector-find-if test sequence)
(apply #'sequence:find-if test sequence args))))
(defmacro vector-find-if-not (test sequence)
`(vector-locater-if-not ,test ,sequence :element))
......@@ -233,9 +239,10 @@
(defmacro list-find-if-not (test sequence)
`(list-locater-if-not ,test ,sequence :element))
(defun find-if-not (test sequence &key from-end (start 0) end key)
(defun find-if-not (test sequence &rest args &key from-end (start 0) end key)
(let ((end (or end (length sequence))))
(declare (type fixnum end))
(if (listp sequence)
(list-find-if-not test sequence)
(vector-find-if-not test sequence))))
(sequence::seq-dispatch sequence
(list-find-if-not test sequence)
(vector-find-if-not test sequence)
(apply #'sequence:find-if-not test sequence args))))
......@@ -39,11 +39,18 @@
:format-arguments (list size type)))