Question: why applyrule returns 0 in this example?

I give up.

Why 

restart;
the_rule:=A::anything+B::anything=A*B;
applyrule(the_rule,a+b);

returns 0?

I was expecting a*b

No clue from help what I am doing wrong.

Maple 2022.2

trace gives this

restart;
the_rule:=A::anything+B::anything=A*B;
trace(applyrule);
applyrule(the_rule,a+b);


{--> enter applyrule, args = A::anything+B::anything = A*B, a+b
                        answer := a + b

                             i := 

                           i := a + b

                          answer := b

                             i := b

                          answer := 0

                             i := 0

                          answer := 0

I am not sure why it is doing the above still. 

I think I will stick to evalindents and subsindets as I do not understand applyrule very well.

Please Wait...