Skip to content

Latest commit

 

History

History
19 lines (9 loc) · 406 Bytes

Operators.md

File metadata and controls

19 lines (9 loc) · 406 Bytes

Operators

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 _?