Since x
is an alphabet not an integer,
Clear[x];IntegerQ[x]
gives
False
But sometimes I want to leave it as it is
I want to construct function IntegerQ2
:
Clear[x];{IntegerQ2[22],IntegerQ2[4.915],IntegerQ2[x]}
would give
{True,False,IntegerQ2[x]}
Can you help me? This problem is not just confined to IntegerQ
. It applies to almost every predicate function.
x
is is aSymbol
, not an alphabet! (just to help you search documentation) :) $\endgroup$