Smorg
12/24/2018, 10:15 PMval list = listOf(...)
val current = ...
val next = list[list.indexOf(current) + 1]
val previous = list[list.indexOf(current) - 1]
karelpeeters
12/24/2018, 10:18 PMShawn
12/25/2018, 1:07 AMPavlo Liapota
12/25/2018, 9:41 AMListIterator
has
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/list-iterator.htmlcurrent
element through this iterator, and not just getting current
element from outside.