Created
March 20, 2024 11:48
-
-
Save BollaBerg/2c70c0f4a3dfa28dea66ead4c50ae19b to your computer and use it in GitHub Desktop.
A method for tapping into a Kotlin stream. Gotten from https://gist.github.com/g0t4/01a49114553c9fe0d0d8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <T: Any, R> T.tap(tap: (T) -> R): T { | |
tap(this) | |
return this | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment