Skip to content

Instantly share code, notes, and snippets.

@yohm
Created July 13, 2012 12:06
Show Gist options
  • Save yohm/3104565 to your computer and use it in GitHub Desktop.
Save yohm/3104565 to your computer and use it in GitHub Desktop.
first F# fizzbuzz code
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