27 Aug 21:11
Re: Haskell symbol ~
Benja Fallenstein <benja.fallenstein <at> gmail.com>
2008-08-27 19:11:07 GMT
2008-08-27 19:11:07 GMT
Hi Maurício, I've got one thing to add to the replies so far: On Wed, Aug 27, 2008 at 8:23 PM, Maurício <briqueabraque <at> yahoo.com> wrote: > 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? To any variable, yes. But you don't apply it to a variable, you apply it to a constructor pattern: not ~xs but ~(x:xs). Best, - Benja
RSS Feed