Join Slack
Communities
Powered by
<@U7GC5SJ3D> would you mind providing a code sampl...
# getting-started
s
Shawn
01/15/2018, 5:55 AM
@Max Russek
would you mind providing a code sample?
m
Max Russek
01/16/2018, 1:17 AM
Someone with more experience with sequences can comment if I’m wrong but I believe:
Copy code
val (names, ages) = people.asSequence().map { it.name to it.age }.unzip().toList()
Might prevent iterating over the list twice
2
Views
Open in Slack
Previous
Next