Could you please describe the behavior of this code:
p[d[1, 2], d[1, 2]] /. p[a___, Plus[b_], c___] -> {{a}, {b}, {c}}
{{}, {d[1, 2]}, {d[1, 2]}}
Why this pattern matches Plus when the expression doesn't have any Plus functions?
Also, how can I check that all arguments of function p[] don't have any Plus, Times and Power?
p[a___, Plus[b_], c___]
alone $\endgroup$HoldPattern
$\endgroup$