I have read a lot of posts in this forum on defining infix symbols like CircleDot and Tilde. The Help pages say Tilde is often used either as an infix or postfix operator, but I can find no example in the Mathematica documentation nor in this forum of how to define it as a postfix operator. I have several such operators I would like to define but I am unable to define even a very simple one.
It is straight-forward to define Tilde as an infix operator. For example,
input:
Foo[expr_] := -expr
expr1_∼expr2_ := Foo[expr1]
x=.;
100∼x
Answer:
-100
However, the operation I wish to define would be
expr1_∼:=Foo[expr1]
100∼
also with an answer of -100, but this is not accepted by Mathematica. I don't wish to invoke the Notations package. Is this possible to do? I hope the answer is trivial and, if so, I apologize for asking.