Created
September 26, 2020 14:08
-
-
Save windmaomao/7a4aa04ce069a559b94eac8f66269b6b 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
// aoc2015-day3-evenOddGroups.kt | |
fun evenOddGroups(s: String) = s | |
.withIndex() | |
.groupBy { it.index % 2 }.values | |
.map { it.map { v -> v.value } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment