Created
May 24, 2013 14:42
-
-
Save vlasovskikh/5644014 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
// Is it possible to shorten collection->array conversion in Kotlin? | |
fun f(): Array<String> { | |
val xs = setOf("foo", "bar") | |
return xs.toArray(Array(xs.size, { "" })) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, it is: