Created
September 10, 2010 04:48
-
-
Save VoQn/573114 to your computer and use it in GitHub Desktop.
FizzBuzz(3の倍数ならFizz, 5の倍数ならBuzz, 15の倍数ならFizzBuzzに文字を置換する問題のアレ)
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
;; Shortest? FizzBuzz | |
(use srfi-1) | |
(let1 ? (.$ zero? (pa$ mod)) | |
(for-each | |
(.$ print (^i (cond [(? i 15) 'FizzBuzz] | |
[(? i 5) 'Buzz] | |
[(? i 3) 'Fizz] | |
[else i]))) | |
(cdr (iota 101)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment