On Wed, Feb 02, 2011 at 10:01:08PM -0500, Ramy Abdel-Azim wrote:
> No need to apologize. Not dumb of you. The mandatory else is unusual. I
> don't personally know of any other language that requires an else for every
> if.

Indeed.  Haskell's if ... then ... else ... is akin to C's ... ? ... :
... ternary operator rather than standard if/then/else clauses.

Remember that if ... then ... else ... is an _expression_, so must
have a value irrespective of whether the condition is true or false;
therefore, there must be an else clause.

   Julian

_______________________________________________
Haskell mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to