News for hackers. Stuff that matters.
Re:Happy Birthday, Ruby by evdubs on Thursday January 10, 2019 @12:51PM (#18876081)
Sincerely, truly a thing of beauty. After writing Lisp code, I don't even understand what people mean when they talk about beauty with respect to programming languages. It's like there are rivers separating the aesthetics of Algol-like languages and an ocean between them and Lisp.

Edit: Here is a Racket equivalent

  (define (fizz-buzz start finish)
    (for-each (λ (i) (println
                      (cond ((= 0 (remainder i 15)) "FizzBuzz")
                            ((= 0 (remainder i 5)) "Fizz")
                            ((= 0 (remainder i 3)) "Buzz")
                            (else i))))
              (range start finish)))
  (fizz-buzz 1 101)

There are no comments on this comment yet.