(Prints the correct lyrics.)
|Score:||(3.02 in 44 votes)|
; Arc version of "99 Bottles of Beer". (def 99-bottles (bottles) (let plural " bottles" (repeat bottles (prn bottles plural " of beer on the wall, " bottles plural " of beer.") (zap [- _ 1] bottles) (if (< bottles 2) (= plural " bottle")) (if (< bottles 1) (and (= bottles "no more") (= plural " bottles"))) (prn "Take one down and pass it around, " bottles plural " of beer on the wall.\n"))) (prn "No more bottles of beer on the wall, no more bottles of beer.") (prn "Go to the store and buy some more, 99 bottles of beer on the wall.\n")) (99-bottles 99)
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!