I was reading this documentation page : http://reference.wolfram.com/language/tutorial/DefiningOutputFormats.html
I really don't understand the point of the Format function.
Indeed, if I take the second example :
Format[xrep[n_]] := StringJoin[Table["x", {n}]]
Calling xrep would give the exact same result as defining things like :
xrep[n_]:=StringJoin[Table["x", {n}]]
So what does the function Format "add of new" here.
Same for the first example, I could write :
bin[x_, y_] := MatrixForm[{{x}, {y}}]
Instead of :
Format[bin[x_, y_]] := MatrixForm[{{x}, {y}}]
And everything would happen the same.
So I don't get what the Format function allows us to do more ?