I Prefer Scheme

- -

You are… Lisp!

           (define bottles
                         (lambda (n)
                           (cond ((= n 0) (display "No more bottles"))
                                 ((= n 1) (display "One bottle"))
                                 (else (display n) (display " bottles")))
                           (display " of beer")))

                       (define beer
                         (lambda (n)
                           (if (> n 0)
                               (begin
                                 (bottles n) (display " on the wall") (newline)
                                 (bottles n) (newline)
                                 (display "Take one down, pass it around") (newline)
                                 (bottles (- n 1)) (display " on the wall") (newline)
                                 (newline)
                                 (beer (- n 1))))))

                       (beer 99)

« And, Inevitably... Getting Started With Rails »