Monthly Archives: November 2012

A subtle difference between closures and .& closures in groovy

We were trying to sort out a weird issue we were having in Grails today, and came across a subtle difference in the way groovy deals with closures and closures that are transformed from methods.

In short, when you convert a method into a closure via .&, the references inside the method don’t get converted and you end up with unexpected results.
Continue reading