Created
January 7, 2012 02:48
-
-
Save diegopacheco/1573587 to your computer and use it in GitHub Desktop.
Scala Anonymous Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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