Dias
listOf("a", "b", "c", "c").fold(mutableListOf<String>()) { acc , s -> if (s != acc.lastOrNull()) { acc.add(s) } acc }
ghedeon
"a", "b", "c", "c", "c", "c"
"a", "b", "c"
"a", "b", "c", "c"
A modern programming language that makes developers happier.