# Sum of Sequence inside a replace rule? [duplicate]

This question already has an answer here:

I'd like a replacement rule that replaces derivatives with their total order. I tried

ReplaceAll[Derivative[x__] -> Plus[x]][Derivative[1, 1]]


but it doesn't return 2, but Sequence[1,1].

How could I get the sum of the sequence to work inside the rule?

## marked as duplicate by Karsten 7., Kuba♦Sep 15 '17 at 17:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• RuleDelayed instead of Rule. – Carl Woll Sep 15 '17 at 17:15

## 1 Answer

As per the comment above,

ReplaceAll[Derivative[x__] :> Plus[x]][Derivative[1, 1]]