Thanks both for the the explanation and the link. The wikibook is really growing fast!<br><br>Abhay<br><br><div class="gmail_quote">On Wed, May 7, 2008 at 5:05 PM, apfelmus &lt;<a href="mailto:apfelmus@quantentunnel.de">apfelmus@quantentunnel.de</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Abhay Parvate wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Just for curiocity, is there a practically useful computation that uses<br>
&#39;seq&#39; in an essential manner, i.e. apart from the efficiency reasons?<br>
</blockquote>
<br></div>
I don&#39;t think so because you can always replace &nbsp;seq &nbsp;with &nbsp;const id .<br>
In fact, doing so will get you &quot;more&quot; results, i.e. a computation that<br>
did not terminate may do so now.<br>
<br>
In other words, we have<br>
<br>
 &nbsp;seq _|_ = _|_<br>
 &nbsp;seq x &nbsp; = id &nbsp; &nbsp;for &nbsp;x &gt; _|_<br>
<br>
but<br>
<br>
 &nbsp;(const id) _|_ = id<br>
 &nbsp;(const id) x &nbsp; = id &nbsp; for &nbsp;x &gt; _|_<br>
<br>
So, (const id) is always more defined (&quot;&gt;&quot;) than &nbsp;seq &nbsp;.<br>
<br>
<br>
For more about _|_ and the semantic approximation order, see<br>
<br>
 &nbsp;<a href="http://en.wikibooks.org/wiki/Haskell/Denotational_semantics" target="_blank">http://en.wikibooks.org/wiki/Haskell/Denotational_semantics</a><div><div></div><div class="Wj3C7c"><br>
<br>
<br>
Regards,<br>
apfelmus<br>
<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>