What you're running in to is some package confusion.
Whenever you read a symbol with the reader, the symbol implicitly inherits the package name of the current package.
You can see this demonstrated here:
1]> (setf baseNames '(coffee wax blue chili stink green soy blackeyed garden))
(COFFEE WAX BLUE CHILI STINK GREEN SOY BLACKEYED GARDEN)
[2]> (export 'basenames)
T
[3]> (defpackage so (:use cl-user cl))
#<PACKAGE SO>
[4]> (in-package so)
#<PACKAGE SO>
SO[5]> (print basenames)
(COMMON-LISP-USER::COFFEE COMMON-LISP-USER::WAX COMMON-LISP-USER::BLUE
COMMON-LISP-USER::CHILI COMMON-LISP-USER::STINK COMMON-LISP-USER::GREEN
COMMON-LISP-USER::SOY COMMON-LISP-USER::BLACKEYED COMMON-LISP-USER::GARDEN)
(COMMON-LISP-USER::COFFEE COMMON-LISP-USER::WAX COMMON-LISP-USER::BLUE
COMMON-LISP-USER::CHILI COMMON-LISP-USER::STINK COMMON-LISP-USER::GREEN
COMMON-LISP-USER::SOY COMMON-LISP-USER::BLACKEYED COMMON-LISP-USER::GARDEN)
By default, you typically start off in the CL-USER
package, which is the case here. CLISP doesn't prompt the package name when it's CL-USER
(you can see it adding SO
to the prompt later when we switch to the SO
package).
So, anyway, what's happening is that you have you packages confused.
Consider:
SO[6]> (position 'wax basenames)
NIL
This fails because it's looking for SO::WAX
in basenames (because we're in the SO
package), not COMMON-LISP-USER::WAX
. Which is what is in the list. That's why this fails. (CL-USER
is an abbreviation/alias for COMMON-LISP-USER
)