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
Document base case of List.for_all and List.exists #9325
Conversation
I think that adding the documentation for the behavior with respect to
? ( Note that there are few generic way to remember the base case here. For instance, for a well-behaved |
Thanks for the explanation! I did actually look up the mathematical definition of universal quantification in predicate logic as well, which said it was a vacuous truth, but that just seems like an axiom. Your explanation actually makes sense.
Absolutely. I chose the current wording to try to be consistent with other similar docstrings, for example that of
But just say the word, then I'll change it. |
You are right, your proposition is more in line in the current style, but maybe merging the two parts would work better:
or we could swap the two:
|
Done, but I made it slightly more explicit:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. You may want to add a Change entry with your contribution.
Done. I figured this change was too trivial for that, but I think I got the formalities right now. |
Merged, thanks for the contribution! |
The base case of
List.for_all
is not immediately obvious to me, so I think it'd be nice to have it documented. And while the base case ofList.exists
is much more obvious just from its name, I documented the base case of that as well, just for consistency.