How can I change the default grouping on an operator without a built-in meaning?
I've created my own infix operator by defining LeftArrow.
SetAttributes[LeftArrow, {NumericFunction, OneIdentity}]
ex1_ ← ex2_ := ex1 /. Rule[ex2[[1]], ex2[[2]]]
(I'm using the Esc<-Esc form of LeftArrow in the second line)
When I use it, I need to string together applications like so:
eqIld2 = (((((((eqIld ← eqVrx) ← eqVct) ← eqIcr) ← eqVct) ← eqIcl) ← eqVtx) ← eqIin)
I'd like to be able to avoid all the parentheses, and to get the same result for the same input with the parentheses removed.
I don't see the default grouping for LeftArrow documented anywhere. I've tried playing with various Attributes, but I can't find one that does what I want. It looks like there's an InfixNotation that accepts options, but they aren't documented.
What's the trick?
LeftArrow[ex1_, ex2_, ex3__] := LeftArrow[LeftArrow[ex1, ex2], ex3], it seems to do the trick. I'm new to Mathematica, and the recursive definition wasn't intuitive, but it's good to know that the more specific match is identified and made first. I think if you remove the reference to Notation, and add text to emphasize the double underscore on thez__arg (which I overlooked for a while), then this is the answer I'm looking for. – Omegaman Aug 06 '15 at 19:40Notationpackage is not needed here. I used it just because I had a similar problem and just copied my example with minor changes. – I.M. Aug 07 '15 at 02:51