groovy Groovy code golfing Spread dot operator(*.)


Example

Spread dot operator can be used instead of collect method

(1..10)*.multiply(2) // equivalent to (1..10).collect{ it *2 }
d = ["hello", "world"]
d*.size() // d.collect{ it.size() }