Wednesday, January 14, 2009

Higher Order Perl (Python Style) TOC

Higher Order Perl has many things of interest for a python programmer. As I've been going through this book (a free copy of which can be viewed here) I've been translating (as literally as possible) the perl code to python. I will continue to update this page as I finish each chapter. In general my plan is to stay as close as possible to the original perl unless the python transliteration is impossible (perl lambda are more expressive) or too unpythonic (e.g. some times a list comprehension or a set datatype does wonders for brevity). But still in many cases there will be a more pythonic way to write many of these examples. This is left as an exercise for the reader. :)

  1. Recursion and Callbacks
  2. Dispatch Tables
  3. Caching and Memoization
  4. Iterators
  5. From Recursion to Iterators
  6. Infinite Streams
  7. Higher-Order Functions
  8. Parsing
  9. Declarative Programming

Please let me know if you see any serious translation errors or have other suggestions.


Pradeep said...

This is a terrific idea.

Have you considered putting the code on some place like github?
Wordpress really screws up text formatting.

Pradeep said...

Er! I meant blogspot not wordpress.

dustbunny said...

Thanks. Yeah I had been thinking about that exact thing. Perhaps when I get the third chapter done I'll do just that.