// FIR_IDENTICAL package a import java.util.ArrayList public fun Iterable.withIndices(): List> { val answer = ArrayList>() var nextIndex = 1 for (e in this) { answer.add(Pair(nextIndex, e)) nextIndex++ } return answer } //from standard library public class Pair( public val first: A, public val second: B )