Skip to content

Instantly share code, notes, and snippets.

@jaredcacurak
Created January 28, 2011 22:00
Show Gist options
  • Save jaredcacurak/801083 to your computer and use it in GitHub Desktop.
Save jaredcacurak/801083 to your computer and use it in GitHub Desktop.
Create a function that accepts a collection of names and an adjective then returns a new collection of values in the form of, "NAME is so ADJECTIVE."
def appendIsSo (adjective, names) {
names?.to*.plus " is so ${adjective}."
}
appendIsSo 'awesome', [to: ['Aby', 'Brooke', 'Claire']]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment