[Haskell-cafe] Language semantics

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Jun 28 07:28:46 EDT 2007


Hello Andrew,

Thursday, June 28, 2007, 1:28:05 AM, you wrote:

> Wow, wait a sec - case expressions are allowed to have guards too??

btw, it's used to implement boolean switches:

case () of
 _ | a>0       -> 1
   | a<0       -> -1
   | otherwise -> 0

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list