
19 Dec
2008
19 Dec
'08
11:42 a.m.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Keir wrote:
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
This is a CAF (Constant Applicative Form). Since it is actually a constant it is never garbage collected, and is always shared, so each thread is only calculating it once. You have essentially created a lookup table. - - Jake -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklLzvIACgkQye5hVyvIUKkaBACfTJfoWokgzmkyN8wm8zIeGc89 UcwAoK2VR8c0zCs0P6XTmAaJcN8oaDYc =9Yu/ -----END PGP SIGNATURE-----