Skip to content

Instantly share code, notes, and snippets.

@ryanlecompte
Created February 26, 2013 18:37
Show Gist options
  • Save ryanlecompte/5040910 to your computer and use it in GitHub Desktop.
Save ryanlecompte/5040910 to your computer and use it in GitHub Desktop.
scala> def foo(f: => Unit) {
| val saved = f _
| println("saved it, now going to invoke it")
| saved()
| }
foo: (f: => Unit)Unit
scala> foo { println("haha!") }
saved it, now going to invoke it
haha!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment