This is also what returning an empty list is for. grep is just a specialized form of map. Use map when you want to do other work as well.
grep { TEST } map { TEST ? $_ : () }
In reply to Re: Re: "foreach" is to "next" as "map" is to ???
by diotalevi
in thread "foreach" is to "next" as "map" is to ???
by McMahon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |