<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">So, ALL patterns are strict, unless one precedes them with "~"?<br><br>Michael<br><br>--- On <b>Mon, 11/30/09, Brandon S. Allbery KF8NH <i>&lt;allbery@ece.cmu.edu&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Brandon S. Allbery KF8NH &lt;allbery@ece.cmu.edu&gt;<br>Subject: Re: [Haskell-cafe] Mystery operator?<br>To: "michael rice" &lt;nowgate@yahoo.com&gt;<br>Cc: "Brandon S. Allbery KF8NH" &lt;allbery@ece.cmu.edu&gt;, haskell-cafe@haskell.org<br>Date: Monday, November 30, 2009, 1:10 PM<br><br><div id="yiv1520863334"><div><div>On Nov 30, 2009, at 12:47 , michael rice wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><table style="" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant:
 inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">From: <a rel="nofollow" target="_blank" href="http://www.haskell.org/haskellwiki/Blow_your_mind#Polynomials">http://www.haskell.org/haskellwiki/Blow_your_mind#Polynomials</a><br><br>&nbsp; -- splitting in two (alternating)<br>&nbsp; -- "1234567" -&gt; ("1357", "246")<br>&nbsp; -- the lazy match with ~ is necessary for efficiency, especially enabling processing of infinite lists<br>&nbsp; foldr (\a ~(x,y) -&gt; (a:y,x)) ([],[])<br><br>This works but can't find (~) operator anywhere. Please explain or site a reference.<br></td></tr></tbody></table></blockquote></div><div><br></div><div><a rel="nofollow" target="_blank" href="http://haskell.org/onlinereport/exps.html#pattern-matching">http://haskell.org/onlinereport/exps.html#pattern-matching</a> --- see the last alternative for "apat", and rule #2
 of section 3.17.2. &nbsp;Basically it changes a (normally strict) pattern into a lazy pattern.</div><br><div> <span class="Apple-style-span" style="font-family: Helvetica; font-size: 11px;"><div style="word-wrap: break-word;"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><div><font
 class="Apple-style-span" face="Monaco"><span class="Apple-style-span" style="font-family: Monaco;"><span class="Apple-style-span" style="font-family: Monaco;">--&nbsp;</span></span></font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-style-span" style="font-family: Monaco;"><span class="Apple-style-span" style="font-family: Monaco;">brandon s. allbery [solaris,freebsd,perl,pugs,haskell] <a rel="nofollow" ymailto="mailto:allbery@kf8nh.com" target="_blank" href="/mc/compose?to=allbery@kf8nh.com">allbery@kf8nh.com</a></span></span></font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-style-span" style="font-family: Monaco;"><span class="Apple-style-span" style="font-family: Monaco;">system administrator [openafs,heimdal,too many hats] <a rel="nofollow" ymailto="mailto:allbery@ece.cmu.edu" target="_blank"
 href="/mc/compose?to=allbery@ece.cmu.edu">allbery@ece.cmu.edu</a></span></span></font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-style-span" style="font-family: Monaco;"><span class="Apple-style-span" style="font-family: Monaco;">electrical and computer engineering, carnegie mellon university &nbsp; &nbsp;KF8NH</span></span></font></div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><br class="Apple-interchange-newline"></span></span></span></div></span> </div><br></div></blockquote></td></tr></table><br>