[Haskell-cafe] Is there a null statement that does nothing?

Svein Ove Aas svein.ove at aas.no
Tue Oct 27 16:05:51 EDT 2009


On Tue, Oct 27, 2009 at 7:07 PM, Bulat Ziganshin
<bulat.ziganshin at gmail.com> wrote:
> Hello Kim-Ee,
>
> Tuesday, October 27, 2009, 8:08:27 PM, you wrote:
>
>> Just for completeness' sake, bottom is a value for any expression.
>> Wouldn't making the else clause optional by defaulting to "undefined"
>> worthy of consideration for Evil Haskell?
>
> in this case you will get an exception when condition is false (when
> 'if' used in expression)
>
Yes, that's why it's evil.

Or.. I know!

ifWithoutElse :: a -> Bool -> Maybe a

(Wait...)
-- 
Svein Ove Aas


More information about the Haskell-Cafe mailing list