Skip to content

Instantly share code, notes, and snippets.

@svetlyak40wt
Created November 21, 2013 07:09
Show Gist options
  • Save svetlyak40wt/7577223 to your computer and use it in GitHub Desktop.
Save svetlyak40wt/7577223 to your computer and use it in GitHub Desktop.
Common Lisp FizzBuzz
(loop for i from 1 to 100
as 3-divable = (zerop (mod i 3))
as 5-divable = (zerop (mod i 5))
as both-divable = (and 3-divable 5-divable)
when both-divable collect :FizzBuzz
else when 3-divable collect :Fizz
else when 5-divable collect :Buzz
else collect i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment