2 ms·
The behavior is undefined if a value does not match its type declaration, and implementations are free to ignore some declarations, like CLISP. So for a portabl
by junke 10y ago
The behavior is undefined if a value does not match its type declaration, and implementations are free to ignore some declarations, like CLISP. So for a portable approach just add a CHECK-TYPE:
(defun foo (s)
(check-type s string)
(print s))
The main point is that (TYPEP NIL 'STRING) is NIL.