Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.count-only/.bool-only exist on combinations/permutations subs, but not methods #1331

Open
zoffixznet opened this issue Dec 23, 2017 · 1 comment

Comments

@zoffixznet
Copy link
Contributor

Filing for records. Looking at the code, should be possible for both forms to have these optimizations.

<Zoffix_> m: .iterator.^lookup('count-only').so.say for permutations(1), combinations(1,1), 1.permutations, 1.combinations(1)
<evalable6> Zoffix_, rakudo-moar 8943f7c54: OUTPUT: «True␤True␤False␤False␤»
<Zoffix_> m: .iterator.^lookup('bool-only').so.say for permutations(1), combinations(1,1), 1.permutations, 1.combinations(1)
<evalable6> Zoffix_, rakudo-moar 8943f7c54: OUTPUT: «True␤True␤False␤False␤»
zoffixznet added a commit that referenced this issue Dec 23, 2017
zoffixznet added a commit that referenced this issue Dec 23, 2017
@zoffixznet
Copy link
Contributor Author

Did the List.permutations one in d4f53ed5d9 with tests in 19604c2d21 Not yet sure what a good approach for List.combinations would look like, if anyone got ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant