Skip to content

Instantly share code, notes, and snippets.

@alterisian
Created November 11, 2010 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alterisian/672435 to your computer and use it in GitHub Desktop.
Save alterisian/672435 to your computer and use it in GitHub Desktop.
example of looping in groovy - similar to ruby I guess
3.times {
println it
}
println "---"
3.upto(9) {
println it
}
println "---"
3.step(9,3) {
println it
}
run in
grails console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment