I forgot to mention:
With regard to the dangerous practice of using "==" (as in your `elem`
example) on Double, every computer scientist or programmer should read
the following paper at some point in their training:
David Goldberg, "What every computer scientist should know about
floating-point arithmetic". ACM Computing Survey Volume 23 , Issue 1
(March 1991) Pages: 5 - 48.
http://portal.acm.org/citation.cfm?id=103163
--KW 8-)
--
Keith Wansbrough <kw217 at cl.cam.ac.uk>
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.