Regular functions are defined as:
add a b = ...
add 2 2
To create an infix operator:
a + b = ...
2 + 2
The compiler will recognise the +
symbol as an operator symbol. Any symbol composed of non alphabetic characters and the underscore are considered operator symbols.
- Q: In this case how will you define a more complex macro like
if _ then _ else _
?