The second argument to cons
is not necessarily a list. It's a list only if you're, well, building a list (proper or otherwise). It's perfectly valid if the cdr
part of a cons
cell is not a list, for example, when building an association list:
(define lookup-table (list (cons 'x 10) (cons 'y 20) (cons 'z 30)))
(assoc 'z lookup-table)
=> '(z . 30)