-----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-----
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to