Only for the geeks: Scala is/ain't Java

Posted by Kelly McCauley on Nov 23, 2009

Finally a bit of code that makes me happy:

def makeClosure(bindMe: Int) = (x: Int) => x + bindMe

A closure that binds at the time the closure is created.

Trackbacks

Use the following link to trackback from your own site:
http://drotner.org/articles/trackback/86