using guards haskell code example
Example: haskell guards
f x | predicate1 = expression1 | predicate2 = expression2 | predicate3 = expression3
f x | predicate1 = expression1 | predicate2 = expression2 | predicate3 = expression3