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 <[email protected]> wrote: From: Daniel Fischer <[email protected]> Subject: Re: [Haskell-cafe] Mystery operator? To: [email protected] 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 [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
