(declaim (ftype (function (simple-vector)) foo)) (defun foo (x) (declare (optimize (speed 3))) (length x)) ; file: /tmp/slimezkgdmK ; in: DEFUN FOO ; (LENGTH X) ; ; note: unable to ; optimize ; due to type uncertainty: ; The first argument is a SEQUENCE, not a VECTOR. ; ; compilation unit finished ; printed 1 note CL-USER> (describe #'foo) # [compiled function] Lambda-list: (X) Declared type: (FUNCTION (SIMPLE-VECTOR) *) Derived type: (FUNCTION (T) (VALUES (UNSIGNED-BYTE 44) &OPTIONAL)) Source file: /tmp/slimezkgdmK