Created
May 10, 2015 14:45
-
-
Save vgaltes/8c1c7b58c07df88bfd3a to your computer and use it in GitHub Desktop.
FSharp Pattern Mathing -> Using parameterized active pattern
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 = | |
function | |
| DivisibleBy 3 & DivisibleBy 5 -> "FizzBuzz" | |
| DivisibleBy 3 -> "Fizz" | |
| DivisibleBy 5 -> "Buzz" | |
| n -> n.ToString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment