Skip to content

make forEach inline to enable composable and suspend calls in lambda #572

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

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

koperagen
Copy link
Collaborator

No description provided.

@@ -7,21 +7,21 @@ import org.jetbrains.kotlinx.dataframe.columns.values

// region DataColumn

public fun <T> DataColumn<T>.forEach(action: (T) -> Unit): Unit = values.forEach(action)
public inline fun <T> DataColumn<T>.forEach(action: (T) -> Unit): Unit = values().forEach(action)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

values was an internal property

@Jolanrensen Jolanrensen self-requested a review January 25, 2024 18:58
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.

sounds reasonable :) might be more functions that need this actually

@koperagen koperagen merged commit 40776fb into master Jan 26, 2024
@Jolanrensen Jolanrensen deleted the inline-foreach branch January 26, 2024 15:37
@koperagen koperagen added this to the 0.13.0 milestone Feb 2, 2024
@koperagen koperagen added the enhancement New feature or request label Feb 2, 2024
@koperagen koperagen self-assigned this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants