Consider the definition:
Clear[fun]
fun[a_ + b_] := fun[a] + fun[b];
fun[a+b+c]
(*fun[a] + fun[b] + fun[c]*)
This works as expected. However, if we use a BlankSequence
on "b":
Clear[fun]
fun[a_ + b__] := fun[a] + fun[b];
fun[a + b + c]
(*fun[a] + fun[b, c]*)
it seems that BlankSequence
eliminates the Plus
in "b+c" and replaces it with Sequence
.
Has anybody a good explanation for this behaviour?