learning to love laziness
Richard Nathan Linger
rlinger at cse.ogi.edu
Wed Sep 24 16:58:20 EDT 2003
On Wed, 24 Sep 2003, Norman Ramsey wrote:
> Consider the following Haskell function:
>
> > asPair x = (fst x, snd x)
>
> This function has type forall a b. (a, b) -> (a, b)
> and is almost equivalent to the identity function, except it
> can be used to make programs terminate that might otherwise fall
> into a black hole.
>
What is an example program that asPair rescues from nontermination?
Nathan
More information about the Haskell
mailing list