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?