
Hi all,
A lot of things posted here I wasn't aware of. My original example involved ~(x,y), so, returning to that context, how would these two simple cases vary:
add2 :: (Int,Int) -> Int
add2 (x,y) = x+y
add2 :: (Int,Int) -> Int
add2 ~(x,y) = x+y
I guess what I'm looking for is the concept that would dictate choosing one over the other.
Thanks,
Michael
--- On Mon, 11/30/09, Daniel Fischer
On Nov 30, 2009, at 13:26 , michael rice wrote:
So, ALL patterns are strict, unless one precedes them with "~"?
"case" patterns are strict (this includes pattern matching in function arguments). "let" patterns are lazy.
And of course, wildcard patterns (_) and variable patterns (var) are lazy too. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe