Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Created January 7, 2012 02:48
Show Gist options
  • Save diegopacheco/1573587 to your computer and use it in GitHub Desktop.
Save diegopacheco/1573587 to your computer and use it in GitHub Desktop.
Scala Anonymous Function
object AnonymousFunctionMain {
def main(args: Array[String]): Unit = {
logCall( () => println("Chamada de metodo atual!") )
}
def logCall(callback: () => Unit): Unit = {
print("Log antes de chamar seu metodo... Invocado as : " + System.currentTimeMillis + "\n")
callback
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment