/ Published in: Groovy

Clojsure composition in Groovy (functional style programing).
@http://www.ibm.com/developerworks/java/library/j-pg08235/index.html
@http://www.ibm.com/developerworks/java/library/j-pg08235/index.html
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// closure // triple = { y -> return 3 * y } // quadruple = { y -> return 4 * y } println "threeDozen: ${threeDozen}" // threeDozen: 36
Comments
