Tom Lokhorst's blog

Writings from a happy Haskell coder.

bool-extras released

Wednesday, May 13, 2009
By Tom Lokhorst

Ever found yourself in need of a if-then-else replacement that can be partially applied? Something you can pass to higher order functions? In short, ever needed this function?

bool :: a -> a -> Bool -> a
bool x _ False = x
bool _ y True  = y

Well, I did. So I’m very happy to announce my first public Haskell library: bool-extras!

Comments are closed.