Skip to content

Conversation

AndreiKingsley
Copy link
Collaborator

@AndreiKingsley AndreiKingsley commented Aug 26, 2025

KDocs and tests for a set of small util functions + deprecate obsolete ones.
Closes #1389

Copy link
Collaborator

@Jolanrensen Jolanrensen left a 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]
Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with Andrew here

Copy link
Collaborator

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?)

@AndreiKingsley AndreiKingsley merged commit f915165 into master Aug 30, 2025
6 checks passed
@AndreiKingsley AndreiKingsley deleted the util_functions_fixes branch August 30, 2025 13:05
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.

Add KDocs for a set of tiny functions
3 participants