Created
April 24, 2015 13:21
-
-
Save vgaltes/edafb6efc55273543a1d to your computer and use it in GitHub Desktop.
FSharp FizzBuzz Kata - simpler pattern matching
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 input = | |
| match (input % 3, input % 5) with | |
| | (0, 0) -> "FizzBuzz" | |
| | (0, _) -> "Fizz" | |
| | (_, 0) -> "Buzz" | |
| | (_, _) -> input.ToString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment