Created
July 13, 2012 12:06
-
-
Save yohm/3104565 to your computer and use it in GitHub Desktop.
first F# fizzbuzz code
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 list1 = [1..100] | |
let to_str i = | |
if (i%15) = 0 then "fizzbuzz" | |
else if (i%5) = 0 then "buzz" | |
else if (i%3) = 0 then "fizz" | |
else (string) i | |
let list2 = List.map to_str list1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment