Created
April 15, 2023 23:58
-
-
Save ozgurg/5fc4974bc0937fb4c7549eb4af5ad789 to your computer and use it in GitHub Desktop.
Kotlin mapTypedArray
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
inline fun <reified IT, reified OT> Array<IT>.mapTypedArray(transform: (IT) -> OT): Array<OT> { | |
return map(transform).toTypedArray() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment