Last active
August 29, 2015 14:09
-
-
Save dtanner/fa3df7d9f349031a3e23 to your computer and use it in GitHub Desktop.
Groovy spread operators on a populated collection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def things = [ [a: 1], [a: 2] ] | |
things.collect { it.a } // returns [1, 2] | |
things*.a // returns [1, 2] | |
things.a // returns [1, 2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment