
3 Aug
2007
3 Aug
'07
10:46 a.m.
On 8/2/07, Jon Harrop
Any suggestions for a perfect example that uniquely demonstrates the benefits of the Haskell language compared to other languages?
For short and sweet, power series is a nice example. Try http://www.polyomino.f2s.com/david/haskell/hs/PowerSeries.hs.txt or http://www.cs.dartmouth.edu/~doug/powser.html. Makes nice use of laziness to allow power series to consume earlier members of the series to produce later ones. Power series 'reversion' has traditionally been a tricky thing to code up but it's almost trivial in Haskell. And power series for many transcendental functions can be implemented directly from defining differential equations. -- Dan