Thanks both for the the explanation and the link. The wikibook is really growing fast!

Abhay

On Wed, May 7, 2008 at 5:05 PM, apfelmus <apfelmus@quantentunnel.de> wrote:
Abhay Parvate wrote:
Just for curiocity, is there a practically useful computation that uses
'seq' in an essential manner, i.e. apart from the efficiency reasons?

I don't think so because you can always replace  seq  with  const id .
In fact, doing so will get you "more" results, i.e. a computation that
did not terminate may do so now.

In other words, we have

 seq _|_ = _|_
 seq x   = id    for  x > _|_

but

 (const id) _|_ = id
 (const id) x   = id   for  x > _|_

So, (const id) is always more defined (">") than  seq  .


For more about _|_ and the semantic approximation order, see

 http://en.wikibooks.org/wiki/Haskell/Denotational_semantics



Regards,
apfelmus


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe