A conditional statement in Haskell whose right-hand side will only be evaluated if the guard statement evaluates to true. A list of guard statements are normally evaluated in a top to bottom order. f x
| x > 0 = 1
| otherwise = 0
The guard statements occur after each "|" and before the "=".
Similar to the mathematic notation:
In this case the guard conditions are the "if" and "otherwise" statements.