@not_true = grep(! $_->{true}, @true_or_false);
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:
(@foo,@bar,@zap) := part [ /foo/, /bar/, /zap/ ] @source;
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl6: Parting of @Arrayed See
by Aristotle (Chancellor) on Dec 14, 2002 at 23:18 UTC | |
by mojotoad (Monsignor) on Dec 15, 2002 at 10:54 UTC | |
by Aristotle (Chancellor) on Dec 15, 2002 at 12:16 UTC | |
by BrentDax (Hermit) on Jan 10, 2003 at 18:30 UTC | |
|
Re: Perl6: Parting of @Arrayed See
by pdcawley (Hermit) on Dec 15, 2002 at 06:10 UTC |