HOP in Action

ziggy on 2006-10-03T22:40:42

MJD has two examples how the principles he outlines in Higher Order Perl are needed in the real world.

Of course he's a little biased, but the examples are screaming out for (a) iteration over a lazy list, and (b) extracting a socket I/O pattern from repetitive code, and using a closure generator to connect a generic server to a simple function to manage requests.

(OK, the second example is a mouthful to describe, but the intent is to separate the wizardly bits from the mundane application code, and it succeeds admirably in that regard.)