rook
04/10/2019, 3:51 PMlistOf("a", "b", "b", "a", "b").distinctFromAdjacent()
// result a,b,a,b
Ruckus
04/10/2019, 4:03 PMlistOf("a", "b", "b", "a", "b")
.windowed(2, partialWindows = true)
.filter { it.size == 1 || it[0] != it[1] }
.map { it[0] }
rook
04/10/2019, 4:42 PMwindowed
thanks!