I found that it is an error in the version of Practical Common Lisp that I am using. I discovered this as I was adding to my question a link to the book. The web version has the correct example here.
It turns out the macro should be defined as follows. It reads cd
as opposed to row
:
(defmacro where (&rest clauses)
`#'(lambda (cd) (and ,@(make-comparisons-list clauses))))
I didn't realize the lambda function and the function that it calls have to share the variable name (cd
in this case).
(I'm not sure if this is considered too localized, but after all this effort I wanted to document it somewhere, so here it is for now.)