Created
February 20, 2013 01:04
-
-
Save thisiswei/4991785 to your computer and use it in GitHub Desktop.
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 (ps1 x) | |
(if (equal? 0 x) | |
0 | |
(if (or (equal? 0 (modulo x 3)) (equal? 0 (modulo x 5))) | |
(+ x (ps1 (- x 1))) | |
(ps1 (- x 1))))) | |
(ps1 999) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment