Haskell guards on lambda functions?

Other answers show how the extensions LambdaCase and MultiWayIf, introduced since this answer was first written, can solve this. Without them, the nearest direct translation is something a bit like

\k -> case () of
       _ | k < 0     -> "negative"
         | k == 0    -> "zero"
         | otherwise -> "positive"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)