Why doesn't PatternTest work with Composition?
x := 2*3; In:= MatchQ[x,_?Function[Null,NumericQ@Unevaluated@#,HoldAll]] Out= False In:= MatchQ[x,_?(Function[Null,NumericQ@Unevaluated@#,HoldAll])] Out= True
Why the difference? Why the
# is highlighted in front-end, indicating there is syntax error? What's the best way to use a
MatchQ to validate an expression by pattern matching its unevaluated form?
In:= NumericQ[HoldAllComplete[2*3]] Out= False
What to put in
<test> so the following return