
27 Feb
2009
27 Feb
'09
6:22 a.m.
| <cite> | The let-binding can be recursive. However, it is much more common for | the let-binding to be non-recursive, in which case the following law | holds: (let !p = rhs in body) is equivalent to (case rhs of !p -> body) | </cite> | | Shouldn't the bang be removed in the final case pattern? No. If p was a simple variable, then case rhs of x -> body is non-strict in Haskell, but should be strict here. | P.S. It should be mentioned that ~ and ! only make sense for single | variant data types (like tuples) That isn't true. Both are useful for multi-variant types Simon