-
-
Save sorah/573131 to your computer and use it in GitHub Desktop.
Revisions
-
sorah revised this gist
Sep 10, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ 100.times{|i|s=(i%3==0?"Fizz":'')+(i%5==0?"Buzz":'');puts s==""?i:s} -
sorah revised this gist
Sep 10, 2010 . 2 changed files with 1 addition and 10 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ puts (1..100).map{|i|s=(i%3==0?"Fizz":'')+(i%5==0?"Buzz":'');s==""?i:s} 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +0,0 @@ -
VoQn revised this gist
Sep 10, 2010 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ ;; Shortest? FizzBuzz (use srfi-1) (map (lambda (n) (let ((mul? (compose zero? (pa$ remainder n)))) (cond ((zero? n) n) -
VoQn created this gist
Sep 10, 2010 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ ;; Shortest? FizzBuzz (map (lambda (n) (let ((mul? (compose zero? (pa$ remainder n)))) (cond ((zero? n) n) ((mul? 15) 'FizzBuzz) ((mul? 5) 'Buzz) ((mul? 3) 'Fizz) (else n))) (iota 101)))