-
Notifications
You must be signed in to change notification settings - Fork 308
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
Combination on zero-sized array #361
Comments
#174 solves (n, 0), but it seems not to work for (0,0) |
andersk
added a commit
to andersk/itertools-rs
that referenced
this issue
Nov 12, 2019
Fixes rust-itertools#361 while also simplifying the code. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
andersk
added a commit
to andersk/itertools-rs
that referenced
this issue
Nov 12, 2019
Fixes rust-itertools#361 while also simplifying the code. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Combination(0) seems to return an empty array.
However, the result differs when the original list is empty or not.
I think it would be better to produce [] instead of None.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=dad32c5aeae27dcd9b14ce8475b5fa79
https://www.wolframalpha.com/input/?i=0+choose+0
https://www.wolframalpha.com/input/?i=1+choose+0
The text was updated successfully, but these errors were encountered: