menegatti
08/16/2017, 9:53 AMdata.groupBy { it[0] }.mapValues { (_, value) -> value.map { it[1] } }
tipsy
08/16/2017, 10:07 AMkarelpeeters
08/16/2017, 10:48 AMdata.groupBy { it[0] }.mapValues { (_, value) -> value[1]}
?arekolek
08/16/2017, 10:52 AMdata.groupBy({ it[0] }, { it[1] })
? 😉karelpeeters
08/16/2017, 10:56 AMtipsy
08/16/2017, 10:56 AMArray<String>
rather than a List<String>
though, where do i put that with this approach? 🤔kirillrakhman
08/16/2017, 11:11 AM.toTypedArray()
at the end of the callarekolek
08/16/2017, 11:11 AMdata.groupBy({ it[0] }, { it[1] }).mapValues { it.value.toList() }
tipsy
08/16/2017, 11:14 AMreturn data.groupBy(
{ it[0] },
{ it[1] }
).mapValues { it.value.toTypedArray() }
arekolek
08/16/2017, 11:16 AMtipsy
08/16/2017, 11:17 AMmenegatti
08/16/2017, 11:43 AMgroupBy
took more than one lambda