-
Notifications
You must be signed in to change notification settings - Fork 76
Util functions fixes #1412
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
Util functions fixes #1412
Conversation
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.
Wow very nice! just a couple of notes
* and returns `true` if it matches the condition. | ||
* @return `true` if at least one element matches the [predicate], `false` otherwise. | ||
* @see [DataColumn.all] | ||
* @see [DataColumn.filter] |
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.
I don't think filter and count are very relevant, only all
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.
Why? IMHO these functions are really related.
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.
Since they all operate on column values with a Boolean condition.
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.
Agree with Andrew here
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.
well so does takeWhile
, dropWhile
and I can think of some more.
I would only group all {}
and any {}
since they both reduce to a single boolean:
Column<T>.function(predicate: (T) -> Boolean): Boolean
(none {}
would be here too, if we had it... do we?)
KDocs and tests for a set of small util functions + deprecate obsolete ones.
Closes #1389