In CLOS, how to specify that a method argument is a list of (e.g.) strings?
e.g. something like:
(defmethod m1 ((x (every 'string)))
(dolist (y x) (print (char y 0))))
In CLOS, how to specify that a method argument is a list of (e.g.) strings?
e.g. something like:
(defmethod m1 ((x (every 'string)))
(dolist (y x) (print (char y 0))))
You can't. Methods can only be specialized on classes, not types. You could manually define the type
list-of-stringswithdeftypeandsatisfies, but it would still be invalid to use it as a specializer in adefmethod.From the defmethod entry of the CLHS: