Skip to content

Instantly share code, notes, and snippets.

@joekarma
joekarma / gist:3883827
Created October 13, 2012 08:32 — forked from meadhikari/gist:3873415
First common lisp function
(loop :for n :from 1 :below 1000
:when (or (zerop (mod n 3))
(zerop (mod n 5)))
:sum n)
@joekarma
joekarma / fizzbuzz.lisp
Created April 22, 2012 06:05 — forked from codeforkjeff/fizzbuzz.lisp
fizzbuzz in Common Lisp
;; Discovered via http://www.adampetersen.se/articles/fizzbuzz.htm
;; “Write a program that prints the numbers from 1 to 100. But for
;; multiples of three print “Fizz” instead of the number and for the
;; multiples of five print “Buzz”. For numbers which are multiples of
;; both three and five print “FizzBuzz”.”
(defun multiple-p (n multiple)
(zerop (mod n multiple)))
(defun fizzbuzz ()