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
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 ...
As the answer was deleted, note that making the function
Flat is not the answer, here, as far as I can see.
Here is an exact copy of the MMA file to reproduce this problem
In:= f[a_,b_]:=a+b; f[a_,b_,c_]:=f[f[a,b],c] CirclePlus=f; 1\[CirclePlus]2\[CirclePlus]5\[CirclePlus]6 Out= f[1,2,5,6]