Created
December 12, 2017 21:00
-
-
Save joegaudet/d6cfc6751c016a336c303ca5143428c3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let fizzbuzz = (i) => | |
switch (i mod 3, i mod 5) { | |
| (0, 0) => "FizzBuzz" | |
| (0, _) => "Fizz" | |
| (_, 0) => "Buzz" | |
| _ => string_of_int(i) | |
}; | |
for (i in 1 to 100) { | |
Js.log(fizzbuzz(i)) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment