Created
January 17, 2012 22:03
-
-
Save diegopacheco/1629284 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 double( f:() => Int ):() => Int = { | |
| val func = () => f() * 2 | |
| return func | |
| } | |
| double( () => 100 )() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment