Format
[expr] Assign values to Format
to control how particular expressions
should be formatted when printed to the user.
Format[f[x___]] := Infix[{x}, "~"]
f[1, 2, 3]
f[1]
Raw objects cannot be formatted:
Format[3] = "three";
Format types must be symbols:
Format[r, a + b] = "r";
Formats must be attached to the head of an expression:
f /: Format[g[f]] = "my f";