Skip to content

Conversation

GassaFM
Copy link
Contributor

@GassaFM GassaFM commented Dec 29, 2013

The three examples in the documentation are wrong:
"while (nextPermutation(a)) { }"
should in fact be
"do { } while (nextPermutation(a));"
or we miss the very first permutation. This is true for nextEvenPermutation, too.

@quickfur
Copy link
Member

LGTM. Thanks for catching this error!

monarchdodra added a commit that referenced this pull request Dec 29, 2013
fix documentation for nextPermutation and nextEvenPermutation
@monarchdodra monarchdodra merged commit 97d3f75 into dlang:master Dec 29, 2013
@monarchdodra
Copy link
Collaborator

And merged. TY.

Off topic: Did you file a report about dealing with empty ranges when doing permutations?

@GassaFM
Copy link
Contributor Author

GassaFM commented Dec 29, 2013

Thank you!

Off topic: Did you file a report about dealing with empty ranges when doing permutations?

No - sorry, it was a problem on my side, Phobos is fine in that regard.

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

Successfully merging this pull request may close these issues.

3 participants