Hacker News new | ask | show | jobs
by wostusername 2348 days ago
In Haskell you usually use `otherwise` for the last guard clause, like so:

     f x | x < 0     = ...
         | otherwise = ...
It took me a while to realize that `otherwise` isn't a keyword or bit of syntax. It's just a variable bound to True: https://hackage.haskell.org/package/base-4.12.0.0/docs/src/G...