Sha256: 2680775242503f911d3cb183165c3412e0c0ece34196ad12d490df01c0877e0d
Contents?: true
Size: 755 Bytes
Versions: 262
Compression:
Stored size: 755 Bytes
Contents
module BeerSong let verse n = match n with | 0 -> "No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n" | 1 -> "1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n" | 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 (+) let sing = verses 99 0
Version data entries
262 entries across 262 versions & 1 rubygems