27 Aug 20:23
Haskell symbol ~
Maurício <briqueabraque <at> yahoo.com>
2008-08-27 18:23:40 GMT
2008-08-27 18:23:40 GMT
Hi, What does '~' mean in Haskell? I read in haskell.org/haskellwiki/Keywords that “(...) Matching the pattern ~pat against a value always suceeds, and matching will only diverge when one of the variables bound in the pattern is used.” Isn't that true for any variable, due to lazyness? At the same place, I found that example, but wasn't wise enough to figure out what it does: (f *** g) ~(x,y) = (f x, g y) Can you help me understand it? Thanks, Maurício
RSS Feed