Skip to content

Instantly share code, notes, and snippets.

@jstrachan
Created March 16, 2010 12:30
Show Gist options
  • Select an option

  • Save jstrachan/333913 to your computer and use it in GitHub Desktop.

Select an option

Save jstrachan/333913 to your computer and use it in GitHub Desktop.
scala> def foo(body: => Unit) { println("start"); body; println("end") }
foo: (body: => Unit)Unit
scala> foo { println("hey"); println("bar") }
start
hey
bar
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment