P is for Practical | |
PerlMonks |
Perl6: Parting of @Arrayed Seeby mojotoad (Monsignor) |
on Dec 13, 2002 at 02:09 UTC ( [id://219484]=perlmeditation: print w/replies, xml ) | Need Help?? |
In the most recent Perl6 summary, I read an interesting development that started when Mike O'Sullivan suggested a built-in anti-grep, or purge (perg), as he put it -- that is, something that inverts the logic of grep much like unless inverts if. All his original suggestion really accomplished was some way of avoiding inverted logic such as this common idiom:
Much discussion ensued, in which the simple concept was beefed up into a respectable Ginsu product. The back and forth resulted in the part concept, a sort of distributed grep across an array:
It slices! It dices! How cool is this? There is implementation code as well as some further thoughts and explanations by TheDamian. So there it is, a nugget pulled from the regularly scheduled Perl6 summaries -- a great example of why monitoring these developments is e'er fascinating. (for others, it might well remain terrifying.) Matt
Back to
Meditations
|
|