A Tango Fibers question and a functional programming anecdote.

Robert Fraser fraserofthenight at gmail.com
Sun Oct 28 02:20:15 PDT 2007


downs Wrote:

> > ["Load ", "Prefetch ", "Prefetch "] /zip/ ([0, 1, 2] /map/ (&info
> /rfix/ currentComic /fix/ (&subtract!(int) /fix/ currentStrip))) /map/
> &concat!(string) /zip/ [&update, &prefetch /fix/ (currentStrip-1),
> &prefetch /fix/ (currentStrip-2)] /map/ &Pool.addTask;

Ewwww!

That whole create-your-own infix operator thing *is* cool, no doubt, but IMO, it reduces readability. To me:

map(array, &func);

... is more readable than...

array /map/ &func;

... but maybe that's because I've never actually done any functional programming.



More information about the Digitalmars-d mailing list