Skip to content

Instantly share code, notes, and snippets.

@capjamesg
Created September 21, 2022 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capjamesg/56ca92fe42cfe70a62b74a58a21d48aa to your computer and use it in GitHub Desktop.
Save capjamesg/56ca92fe42cfe70a62b74a58a21d48aa to your computer and use it in GitHub Desktop.
An implementation of CracklePop in Lisp.
(defun cracklepop (num)
(cond
((and (= (mod num 3) 0) (= (mod num 5) 0)) "CracklePop")
((= (mod num 3) 0) "Crackle")
((= (mod num 5) 0) "Pop")
(num)))
(loop for val from 1 below 100 do (print (cracklepop val)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment