Created
April 3, 2017 08:03
-
-
Save Biacco42/8b585d6fa56a67f4b138369cbc9a2303 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1 ..< 100).forEach { | |
switch ($0 % 3, $0 % 5) { | |
case (0, 0): | |
print("FizzBuzz") | |
case (0, _): | |
print("Fizz") | |
case (_, 0): | |
print("Buzz") | |
default: | |
print($0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment