Skip to content

Conversation

@Allex-Nik
Copy link
Collaborator

@Allex-Nik Allex-Nik commented Nov 6, 2025

Fixes #1279

Copy link
Collaborator

@AndreiKingsley AndreiKingsley left a comment

Choose a reason for hiding this comment

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

Great job!
Regarding overloads for GroupBy and Pivot - I'm working on a general KDoc system for these operations, so I'll be reworking them anyway in the future, so you can leave them as they are.

@AndreiKingsley AndreiKingsley self-requested a review November 7, 2025 14:19
* @throws [NoSuchElementException] if the [DataColumn] contains no element matching the [predicate]
* (including the case when the [DataColumn] is empty).
*/
public fun <T> DataColumn<T>.first(predicate: (T) -> Boolean): T = values.first(predicate)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is there any reason we do not make this function inline? last in the same case is inline (the same goes for DataColumn<T>.firstOrNull(predicate: (T) -> Boolean))

Copy link
Collaborator

Choose a reason for hiding this comment

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

nope, please inline it too :) that will allow people to call suspend functions inside the body etc

@Allex-Nik Allex-Nik force-pushed the first-firstOrNull-documentation-tests branch 2 times, most recently from 6e10c71 to 803c080 Compare November 27, 2025 17:09
@Allex-Nik Allex-Nik force-pushed the first-firstOrNull-documentation-tests branch from 803c080 to f3b0fb1 Compare November 27, 2025 22:54
@Allex-Nik Allex-Nik force-pushed the first-firstOrNull-documentation-tests branch from f3b0fb1 to eed2863 Compare November 28, 2025 16:00
@Allex-Nik Allex-Nik force-pushed the first-firstOrNull-documentation-tests branch from eed2863 to 08a1935 Compare December 2, 2025 11:52
@Jolanrensen Jolanrensen self-requested a review December 2, 2025 11:55
@Allex-Nik Allex-Nik force-pushed the first-firstOrNull-documentation-tests branch from 08a1935 to 991760d Compare December 2, 2025 13:46
@AndreiKingsley AndreiKingsley merged commit 6ed2f0c into master Dec 2, 2025
3 of 4 checks passed
@AndreiKingsley AndreiKingsley deleted the first-firstOrNull-documentation-tests branch December 2, 2025 13:47
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 and missed tests for first and firstOrNull functions

6 participants