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?
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?