Created
January 17, 2012 21:58
-
-
Save diegopacheco/1629217 to your computer and use it in GitHub Desktop.
Higher Order Functions in Scala
This file contains hidden or 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
| def payment(f:() => Int):Int = 100 - f() | |
| payment( () => 20 + 10 ) // Result will be 70 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment