[Haskell-cafe] Shortening if-then-else
Tomasz Zielonka
tomasz.zielonka at gmail.com
Tue Nov 22 15:50:02 EST 2005
On Tue, Nov 22, 2005 at 10:15:15PM +0300, Bulat Ziganshin wrote:
> Tuesday, November 22, 2005, 9:17:57 PM, you wrote:
>
> MN> return $ guard (cmdType cmd /= CmdSitError Serv) >> return seat_num
>
> 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 ;-)
Best regards
Tomasz
More information about the Haskell-Cafe
mailing list