Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FizzBuzz

Name: Anonymous 2011-08-31 2:15

(defun fizz-buzz (start end)
  (loop for x from start to end do
       (let ((3? (= (mod x 3) 0))
         (5? (= (mod x 5) 0)))
     (when 3?             (format t "Fizz"))
     (when 5?          (format t "Buzz"))
     (unless (or 3? 5?) (format t "~a" x))
     (terpri))))


What does /b/ think?

Name: Anonymous 2011-09-01 12:29

>>28,29 I like your style, gentlemen.

By the way, concatenating strings in a loop is perfectly OK in CPython at least, because it implements a peculiar ad hoc version of uniqueness typing for strings in particular.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List