Created
October 29, 2009 07:24
-
-
Save tstone/221239 to your computer and use it in GitHub Desktop.
Conceptual LISP FizzBuzz solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (fizzbuzz start end) ( | |
(define (print x) ( ..something.. )) | |
(cond | |
(= (mod start 15) 0) (print "fizzbuzz")) | |
(= (mod start 3) 0) (print "fizz")) | |
(= (mod start 5) 0) (print "buzz")) | |
((print start)) | |
) | |
(cond | |
((< start end) ((fizzbuzz (+ 1 start) end))) | |
) | |
)) | |
(fizzbuzz 1 100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment