Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Created January 17, 2012 22:03
Show Gist options
  • Select an option

  • Save diegopacheco/1629284 to your computer and use it in GitHub Desktop.

Select an option

Save diegopacheco/1629284 to your computer and use it in GitHub Desktop.
Higher Order Functions in Scala
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