Time flies like an arrow…
October 28th, 2007Scala.. more than interesting language and a source code of an application that delivers ultimate truth that changes destinies of people that get affected.. Meet Scala the language a famous guru named TimerAnonymous
object TimerAnonymous {
def oncePerSecond(callback: () => unit) {
while (true) { callback(); Thread sleep 1000 }
}
def main(args: Array[String]) {
oncePerSecond(() =>
println("time flies like an arrow..."))
}
}
