Hello good people of stackoverflow, I am having a weird problem while following Adam Peterson’s Lisp for the Web tutorial. The problem in question is probably a problem with Clozure CL, however I just wanted to provide some background.
What’s happening is simple. I declare the variable *games* by doing (defvar *games* ‘()). When I declare a function that references this variable, such as game-from-name, the compiler just yells at me undeclared free variable *games*.
Does anyone know why this is happening?
You could be executing in a different package. Try examining the value of the
*in-package*variable at the points where you define and access the variable to check which package is current. You use thein-packagemacro to set the current package.