Created
March 5, 2018 16:21
-
-
Save sfeatherstone/92a05a310315aa397401d1525ffbcb40 to your computer and use it in GitHub Desktop.
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
//Copy using the lamda in the constructor | |
inline fun <reified T> catTwoArrays3(array1 :Array<T>, array2 :Array<T>) : Array<T> { | |
return Array<T>(array1.size + array2.size, | |
{ if (it<array1.size) array1[it] else array2[it-array1.size]}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment