Groovy Closure

(1..10).findAll(it%2==}).each(println "In a closure: $it" })

Output of Script

 112 ms
In a closure: 2
In a closure: 4
In a closure: 6
In a closure: 8
In a closure: 10
 [2, 4, 6, 8, 10] java.util.ArrayList

Comments

Popular posts from this blog

தீபம் பிளக்ஸ்

காது புடி வாத்தியார்

PCF - Cloud Foundry Overview - Starting, Restarting and Restaging applications