Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. bottles: func [n][
  2. switch/default n [
  3. 0 ["no more bottles"]
  4. 1 ["1 bottle"]
  5. ][form reduce [n "bottles"]]
  6. ]
  7.  
  8. verse: func [n][
  9. either n = 0 [
  10. {No more bottles of beer on the wall, no more bottles of beer.
  11. Go to the store and buy some more, 99 bottles of beer on the wall.}
  12. ][
  13. form reduce [
  14. bottles n "of beer on the wall," bottles n "of beer.^/"
  15. "Take one down and pass it around," bottles (n - 1) "of beer on the wall.^/"
  16. ]
  17. ]
  18. ]
  19.  
  20. repeat i 100 [print verse 100 - i]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement