[Haskell-cafe] Shortening if-then-else
Matthias Neubauer
neubauer at informatik.uni-freiburg.de
Tue Nov 22 16:09:28 EST 2005
Bulat Ziganshin <bulatz at HotPOP.com> writes:
> Hello Matthias,
>
> 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 :)
Only if seat_num is of type () ... :-)
-Matthias
--
Matthias Neubauer |
Universität Freiburg, Institut für Informatik | tel +49 761 203 8060
Georges-Köhler-Allee 79, 79110 Freiburg i. Br., Germany | fax +49 761 203 8052
More information about the Haskell-Cafe
mailing list