The MultiWayIf extension

The MultiWayIf GHC extension introduces a kind of if expression that allows more than two branches, using the same syntax as pattern guards.

λ> x = 5

λ> if | x < 3     -> "small"
 >    | x < 7     -> "medium"
 >    | otherwise -> "large"
 >
"medium"