We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
idx-of
Add a command which uses a predicate and returns the first index where the predicate returns true.
Performs a linear search and stops on the first true of the predicate. Returns the index matched.
true
find-idx
find
TableRow
Option
-1
Table
String
Alternatively, a numeric like -1 could be returned
A use case is to find an index for insertion or skipping. In that case, a sensible return value would be beneficial and merits a considered design.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Add a command which uses a predicate and returns the first index where the predicate returns true.
Performs a linear search and stops on the first
true
of the predicate.Returns the index matched.
Design notes
idx-of
could also befind-idx
find
should be reserved for something which returns aTableRow
find-idx
would actually align with a futurefind
implOption
is wanted-1
could be returnedTable
,String
)A use case is to find an index for insertion or skipping.
In that case, a sensible return value would be beneficial and merits a considered design.
The text was updated successfully, but these errors were encountered: