-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Inconsistent order of arguments in variants of 'find' #19186
Comments
Related to #10593 |
|
I think I may have figured out the reason for why the arguments are reversed in the "specific-element search" version of these methods. Otherwise, if |
Most of the variants of
find
take the test predicate as the first argument and the array to be searched as the second argument (e.g.find(f::Function, A)
,findfirst(predicate::Function, A)
,findlast(predicate::Function, A)
,findnext(predicate::Function, A, i::Integer)
,findprev(predicate::Function, A, i::Integer)
). But in the special case where the test predicate is a specific element value, this order of arguments is reversed (e.g.findfirst(A, v)
,findlast(A, v)
,findnext(A, v, i::Integer)
,findprev(A, v, i::Integer)
). Should the order of arguments be made consistent?@kshyatt
The text was updated successfully, but these errors were encountered: