Consider the following
ClearAll[jd];
ValueQ[jd]
We expect False
and get it. Now consider
ClearAll[jd];
ValueQ[jd /. {foo -> Unique[]}]
which yields True
. But
jd /. {foo -> Unique[]}
is just jd
and has no value defined. What's going on here?
ValueQ[]
is a funny beast. Try{ValueQ@E, ValueQ@Sin@E, ValueQ@Pi, ValueQ@Sin@Pi, ValueQ@N@Pi}
:) $\endgroup$ValueQ
does not mean numerical value I think. $\endgroup$ClearAttributes[ValueQ, Protected]; ClearAttributes[ValueQ, ReadProtected]; ValueQ // Information; DownValues[ValueQ][[1]] /. {System
Dumps -> s, System
Dumph -> h}
$\endgroup$True
):! Hold[Evaluate[jd /. {foo -> Unique[]}]] === Hold[jd /. {foo -> Unique[]}]
, as! Hold[Evaluate[jd]] === Hold[jd /. {foo -> Unique[]}]
$\endgroup$