RosettaCodeData/Task/FizzBuzz/F-Sharp/fizzbuzz-2.fs
2023-07-01 13:44:08 -04:00

8 lines
256 B
FSharp

[1..100]
|> List.map (fun x ->
match x with
| _ when x % 15 = 0 ->"fizzbuzz"
| _ when x % 5 = 0 -> "buzz"
| _ when x % 3 = 0 -> "fizz"
| _ -> x.ToString())
|> List.iter (fun x -> printfn "%s" x)