99 Bottles of Beer/Lisp: Difference between revisions
Content added Content deleted
m (missing: Emacs Lisp) |
(Add Shen) |
||
Line 128: | Line 128: | ||
(prinl (bottles (dec 'N)) " on the wall.") |
(prinl (bottles (dec 'N)) " on the wall.") |
||
(prinl) )</lang> |
(prinl) )</lang> |
||
=={{header|Shen}}== |
|||
<lang Shen>(define bottles-h |
|||
{ number --> string } |
|||
0 -> "No more beer" |
|||
1 -> "One bottle of beer" |
|||
N -> (make-string "~A bottles of beer" N)) |
|||
(define bottles |
|||
{ number --> number } |
|||
0 -> 0 |
|||
X -> (let Msg (bottles-h X) |
|||
(do (output "~A on the wall~%~A~%Take one down, pass it around~%~A on the wall~%~%" Msg Msg (bottles-h (- X 1))) |
|||
(bottles (- X 1)))))</lang> |
|||
=={{header|Wart}}== |
=={{header|Wart}}== |