japt icon indicating copy to clipboard operation
japt copied to clipboard

Filtering Permutations & Combinations

Open PeterShaggyNoble opened this issue 5 years ago • 0 comments

On a recent challenge I needed to get the combinations of an array and then filter them, which got me thinking that an additional, optional function parameter for à & á to apply the filter directly, without the need for f, would be handy. And, in most cases, would save 2 bytes.

I had also considered that maybe making that function parameter a map rather than a filter might be more useful. Apart from my immediate use-case, I couldn't come up with an argument for one over the other but, seeing as the n parameter of those methods is also a filter, of sorts, a filter does probably make most sense.

PeterShaggyNoble avatar Sep 10 '19 22:09 PeterShaggyNoble