oday
10/11/2017, 10:05 AMarr.forEach {
if (it < smallest) {
smallest = it
}
}
compared to what it’s suggesting
arr
.asSequence()
.filter { arr[it] < smallest }
.forEach { smallest = arr[it] }