Search
3:16:27
moon-child
is there a standard cl function like constant-form-p? Would do something like (or (atom x) (eq (car x 'quote')))
3:19:22
moon-child
err add a (and (not (symbolp x))) in there
4:24:56
jackdaniel
(constantp form)
4:25:28
jackdaniel
why atom is excluded in your definition?
4:26:04
jackdaniel
(and (constantp x) (listp x))
4:26:40
moon-child
jackdaniel: when did I exclude atom?
4:26:48
moon-child
I certainly didn't mean to
4:27:45
moon-child
(and (not (symbolp x)) (or (atom x) (eq (car x 'quote)))) should return true for atoms
4:28:35
moon-child
regardless ty for constantp
5:20:32
jackdaniel
atom may or may not denote a constant
5:20:49
jackdaniel
(defconstant +foo+ 42) vs (defvar +bar+ 42)
5:21:08
jackdaniel
(+ 1 2 3) will be often constant if the compiler does some analysis
5:21:32
jackdaniel
you may call (eval <constant>) on constants at compilation time
5:21:47
jackdaniel
right, I misunderstood what you wrote, still not quite right (ditto defconstant vs defvar)
5:26:34
moon-child
if something is an atom (and not a symbol), then it is a constant
5:26:48
moon-child
if it is not an atom, or it is a symbol, then it might also be a constant