Peter Seibel writes:
- figure out how to distinguish between a defvar/defparameter and defcontstant symbol.
This should be implementation dependant.
How about CONSTANTP?
CONSTANTP does not do what you think!
[22]> (defvar x 1) X [23]> (defvar c 1) C [24]> (constantp c) T [25]> (constantp c) T [26]> (constantp 'x) T [27]> (constantp 'x) NIL [28]> (constantp 'c) NIL [29]> (constantp #(1 2 3)) T [30]> (constantp '(1 2 3)) NIL [31]> (constantp (list 1 2 3)) NIL
CONSTANTP could be useful when writting a macro or a compiler macro, but that's about all.