Dear all,
regardless of the sense of the following definitions:
f[x_ + y_Plus] := {x, {y}}
g[x_ + y__Plus] := {x, {y}}
Why does g not match the following expression, as it does with f:
f[a + b + c]
g[a + b + c]
Result:
{a, {b + c}}
g[a + b + c]
I would expect, g[a+b+c] is transformed to g[a + Plus(b,c)] (due to the Flat attribute of Plus) and then a matches x_ and Plus(b,c) matches y__ Plus, even because y__ Plus is less specific than y_ Plus (in case of f)