Last active
September 5, 2018 04:20
-
-
Save Caellian/da709f40ad27e95f84e6d3d9b75d0f2f to your computer and use it in GitHub Desktop.
Kotlin code bits.
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 T> Array<Array<T>>.transpose(): Array<Array<T>> { | |
| return Array(this[0].size) { i -> Array (this.size) { j -> this[j][i]} } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment