Suppose I have a simple function that I assign to an operator
f[a_, b_] := a + b
CirclePlus = f
Then I want to write
1 (+) 2 (+) 3
But it doesn't work, because it's trying to evaluate f[1,2,3].
So how does one instruct Mathematica that it should instead evaluate f[f[1,2],3], or alternatively how does one work with infix operators? I'd be okay if I had to write my as f[a_List] instead, and then took care of things myself ...
-- Edit:
As the answer was deleted, note that making the function Flat is not the answer, here, as far as I can see.
-- Edit:
Here is an exact copy of the MMA file to reproduce this problem
In[13]:= f[a_,b_]:=a+b;
f[a_,b_,c_]:=f[f[a,b],c]
CirclePlus=f;
1\[CirclePlus]2\[CirclePlus]5\[CirclePlus]6
Out[16]= f[1,2,5,6]



This is what I have:
In[13]:= f[a_,b_]:=a+b; f[a_,b_,c_]:=f[f[a,b],c] CirclePlus=f; 1[CirclePlus]2[CirclePlus]5[CirclePlus]6 Out[16]= f[1,2,5,6]
– Noon Silk Mar 22 '15 at 09:49a_which is aBlank[]and two underscoresa__which is aBlackSequence[]. Please copy my example and try it. Btw, if you add the definitiona+byou wont see anything, because it is instantly evaluated to a number. – halirutan Mar 22 '15 at 09:53With the underscore this works. Thanks!
– Noon Silk Mar 22 '15 at 09:55