tracks/fsharp/exercises/beer-song/Example.fs in trackler-2.2.1.44 vs tracks/fsharp/exercises/beer-song/Example.fs in trackler-2.2.1.45
- old
+ new
@@ -7,9 +7,9 @@
| 2 -> "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n"
| _ -> sprintf "%d bottles of beer on the wall, %d bottles of beer.\nTake one down and pass it around, %d bottles of beer on the wall.\n" n n (n-1)
let verses stop start =
[stop .. -1 .. start]
- |> List.map (fun i -> verse i + "\n")
- |> List.reduce (+)
+ |> List.map verse
+ |> String.concat "\n"
let sing = verses 99 0
\ No newline at end of file