Skip to content

Instantly share code, notes, and snippets.

@danieldbower
Created April 15, 2014 13:28
Show Gist options
  • Save danieldbower/10732657 to your computer and use it in GitHub Desktop.
Save danieldbower/10732657 to your computer and use it in GitHub Desktop.
Groovy minus equals
def vals = [50, 25, 5, 0, -5, -25, 50]
vals.each{
println "\n\nVal is $it"
int i = 50
i =- it
println "(50 =- $it) is equal to $i"
i = 50
i -= it
println "(50 -= $it) is equal to $i"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment