Journal of Functional Programming



FUNCTIONAL PEARL

Power series, power serious


M. DOUGLAS MCILROY a1
a1 Dartmouth College, Hanover, NH 03755, USA 1 (e-mail: doug@cs.dartmouth.edu)

Abstract

Power series and stream processing were made for each other. Stream algorithms for power series are short, sweet, and compositional. Their neatness shines through in Haskell, thanks to pattern-matching, lazy lists, and operator overloading. In a short compass one can build working code from ground zero (scalar operations) up to exact calculation of generating functions and solutions of differential equations.



Footnotes

1 This paper was begun at Bell Laboratories, Murray Hill, NJ 07974, USA.