Possible to pass closure into spread operator

Viewed 389

Is it possible to use a closure with the spread operator with Groovy.

e.g.

def numbers = [4,8]
def numbersPlusTen = numbers*.{it -> it + 10}

Or can the spread operator only ever work on a method or property?

3 Answers
Related