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 <daniel.is.fischer@web.de> wrote: From: Daniel Fischer <daniel.is.fischer@web.de> Subject: Re: [Haskell-cafe] Mystery operator? To: haskell-cafe@haskell.org Date: Monday, November 30, 2009, 1:35 PM Am Montag 30 November 2009 19:32:01 schrieb Brandon S. Allbery KF8NH:
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