Anonymous user
99 Bottles of Beer/Lisp: Difference between revisions
m
updated Ol sample
m (moved to Common Lisp) |
m (updated Ol sample) |
||
Line 96:
=={{header|Ol}}==
<lang
(
(print n " bottles of beer on the wall,")▼
(print n " bottles of beer.")▼
(print "Take one down, pass it around, ")▼
(if (eq? n 1)▼
(begin▼
(print "No more bottles of beer on the wall.")▼
(print (- n 1) " bottles of beer on the wall,")▼
(for-each (lambda (n)
(print "No more bottles of beer on the wall,")▼
(let ((bottle (lambda (n) (if (eq? n 1) " bottle" " bottles")))
(print "Go to the store and buy some more,")▼
n (bottle n) " of beer." "\n"
(if (eq? m 0) "no more" m)
(reverse (iota nn 1)))
(print
</lang>
|