Skip to content

Instantly share code, notes, and snippets.

@dtanner
Last active August 29, 2015 14:09
Show Gist options
  • Save dtanner/fa3df7d9f349031a3e23 to your computer and use it in GitHub Desktop.
Save dtanner/fa3df7d9f349031a3e23 to your computer and use it in GitHub Desktop.
Groovy spread operators on a populated collection
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