Skip to content

Instantly share code, notes, and snippets.

@vgaltes
Created April 24, 2015 07:06
Show Gist options
  • Select an option

  • Save vgaltes/39d4f39e3dab86555200 to your computer and use it in GitHub Desktop.

Select an option

Save vgaltes/39d4f39e3dab86555200 to your computer and use it in GitHub Desktop.
FSharp FizzBuzz Kata - refactor to list
let fizzBuzz input =
if List.exists (fun n -> (n = input)) [3; 6; 9] then "Fizz"
elif input = 5 then "Buzz"
else input.ToString()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment