If you're going to write a grep iterator, have the return value be an empty list on element failure. This allows failures to be removed from the list instead of just being substituted with undefined values. In fact, grep is just a special case of map.
grep /^42/ map { /^42/ ? $_ : () } sub { /^42/ ? $_ : () }
In reply to Re^2: Pipe dream
by diotalevi
in thread Pipe dream
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |