Talk:Haskell/Control structures

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Note that the if and case stuff is now redundant with the recently imported YAHT text on conditional statements (see Haskell/Variables and functions. We should decide what to do with this page. There's still a bit about guards which is worth talking about at some point. Also, showing all the conditional expressions on the same page is quite useful -- Kowey 13:06, 30 December 2006 (UTC)

[edit] "The difference between if and case"

The section "The difference between if and case" distinguishes between the "if" expression and the "case" expression, but I do not think this is correct. The Haskell 98 specification states that an "if" expression (if x then 1 else 2) is always equivalent to a "case" expression (case x of { True -> 1 ; False -> 2 }). 66.214.200.47 (talk) 04:47, 21 April 2008 (UTC)