https://kotlinlang.org logo
#announcements
Title
# announcements
r

rocketraman

06/24/2016, 7:06 PM
Yup:
Copy code
fun <T> Iterator<T>.doWhile(condition: () -> Boolean, op: (e: T) -> Unit) {
  while(hasNext() && condition()) op(next())
}