[Haskell-cafe] Shortening if-then-else

Joel Reymont joelr1 at gmail.com
Tue Nov 22 16:07:29 EST 2005

Why wouldn't Bulat's version work?

I don't think it will work for me either way as I'm returning m  
(Maybe Int) where m is my own monad. It seems that folks assumed that  
m itself was the maybe monad. Unless I'm mistaken the code below  
won't work otherwise.

On Nov 22, 2005, at 8:50 PM, Tomasz Zielonka wrote:

> On Tue, Nov 22, 2005 at 10:15:15PM +0300, Bulat Ziganshin wrote:

>> return $ when (cmdType cmd /= CmdSitError Serv) (return seat_num)
>> must also work :)
> But it won't.
> I have made this mistake too in the past ;-)


More information about the Haskell-Cafe mailing list