[Haskell-cafe] Laziness question
Brandon S Allbery KF8NH
allbery at ece.cmu.edu
Sat Jul 31 13:30:32 EDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 7/31/10 12:59 , michael rice wrote:
> OK, in f, *length* already knows it's argument is a list.
>
> In g, *length* doesn't know what's inside the parens, extra evaluation
> there. So g is already ahead before we get to what's inside the [] and ().
>
> But since both still have eval x to *thunk* : *thunk*, g evaluates "to a
> deeper level?"
The whole point of laziness is that f *doesn't* have to eval x.
- --
brandon s. allbery [linux,solaris,freebsd,perl] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxUXbgACgkQIn7hlCsL25X5dQCdFskJ8+DdIVnJtsYVAFJkHcHO
yjEAoMuoKU2yXLKVcLFGumLb0IJAVxnx
=5KJ5
-----END PGP SIGNATURE-----
More information about the Haskell-Cafe
mailing list