Skip to content

Instantly share code, notes, and snippets.

@brunkb
Created February 17, 2017 05:51
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 brunkb/bd67e5517e1ee3a89ca892091725ab4d to your computer and use it in GitHub Desktop.
Save brunkb/bd67e5517e1ee3a89ca892091725ab4d to your computer and use it in GitHub Desktop.
My version of FizzBuzz in Groovy (Console)
1.upto(100, { i -> println "${i % 3 ? '' : 'Fizz'}${i % 5 ? '' : 'Buzz'}" ?: i })
@brunkb
Copy link
Author

brunkb commented Sep 12, 2019

I submitted this one years ago to Rosetta Code as an improvement over the one that was featured there. It is still on there as of 2019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment