[Haskell-cafe] Haskell showcase in 5 minutes

Doug McIlroy doug at cs.dartmouth.edu
Tue Feb 28 14:45:02 CET 2012

Here's an example that fits comfortably in 5 minutes--if
your audience knows elementary calculus:
It depends critically on lazy evaluation, which knocks out
a lot of competing languages right from the start.

The five-minute version would begin with power-series
Then comes multiplication--an eye-opener. No subscripts! No worry
about how many terms to carry in intermediate results.

That's about all you have time to really derive. Go on
to mention that division is about equally easy.  Then
allude to substitution (also called composition) and its
inverse, reversion.  Lots of finicky papers have been
written about reversion over more than two centuries.
Throw that one-liner on the screen side-by-side with
Algorithm S (which is only pseudocode!) from Knuth
section 4.7.  That should convince the most skeptical


More information about the Haskell-Cafe mailing list