
27 Aug
2008
27 Aug
'08
2:23 p.m.
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