Circa 2010, when I saw this scala code snippet for the first time, my mind was blown at the possibilities...
object WhileDemo {
def main( args: Array[String]): Unit = {
var i = 1
While( i < 10 ) {
println( i )
i+=1
}
}
def While( p: => Boolean ) ( c: => Unit ): Unit = {
if( p ) { c; While(p)(c) }
}
}