-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 7/31/10 14:24 , michael rice wrote:
> Are you saying:
>
> [ head x ] -> [ *thunk* ] and length [ *thunk* ] -> 1, independent of
> what *thunk* is, even head [], i.e., *thunk* never needs be
evaluated?
Exactly. (I was being cagey because the first response was cagey, possibly
suspecting a homework question although it seems like an odd time for it.)
length not only does not look inside of the thunk, it *can't* look inside
it; all it knows is that it has a list, it specifically does *not* know what
that list can hold. So the only thing it can do is count the number of
"unknown somethings" in the list.
- --
brandon s. allbery [linux,solaris,freebsd,perl]
allbery@kf8nh.comsystem administrator [openafs,heimdal,too many hats]
allbery@ece.cmu.eduelectrical 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/iEYEARECAAYFAkxUa54ACgkQIn7hlCsL25XVpgCeIxWwVWhjYQQ86uE2JeJD7mCB
mKUAn3WwhrgrYyudv/E8pn5a0HB4gLA9
=H++/
-----END PGP SIGNATURE-----
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe