I'm writing some utility functions for manipulating equations. The algebraic manipulation palette doesn't have cross multiplication, for example, which I find a handy manipulation. It it easily implemented as:
crossMultiply[a_==b_]:=Numerator[a] Denominator[b]==Numerator[b] Denominator[a]
and can be put at the end of an equation using double slashes.
In[209]:= x+y==((-2+y) y)/x^2//crossMultiply
Out[209]= x^2 (x+y)==(-2+y) y
If I want to divide both sides of an equation by some expression, I can use
divideBy[a_ == b_, divisor_: 1] := a/divisor == b/divisor
I can do this:
In[210]:= x^2 == (-2+y)y //divideBy[#,s]&
Out[210]= x^2/s == ((-2+y)y)/s
but I'd like to avoid using the slot and ampersand, so that it would look like this;
In[210]:= x^2 == (-2+y)y //divideBy[s]
Out[210]= x^2/s == ((-2+y)y)/s
Any ideas?