Skip to content

Instantly share code, notes, and snippets.

@linstantnoodles
Created September 24, 2015 00:53
Show Gist options
  • Save linstantnoodles/8d44b64774e65ec25229 to your computer and use it in GitHub Desktop.
Save linstantnoodles/8d44b64774e65ec25229 to your computer and use it in GitHub Desktop.
cracklepop
(define (crackle-pop)
(define (divisible a b)
(= (mod a b) 0))
(define (crackle-popper a b)
(if (<= a b) (crackle-popper (+ a 1) b
(cond
((and (divisible a 3) (divisible a 5)) (display "CracklePop") (newline))
((divisible a 3) (display "Crackle") (newline))
((divisible a 5) (display "Pop") (newline))
))))
(crackle-popper 1 100))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment