Created
July 12, 2012 08:29
-
-
Save taiki45/3096713 to your computer and use it in GitHub Desktop.
s = 1, 3, ... 99 をすべて足す
This file contains 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 (make-list proc st en) | |
(cond ((= st en) (cons (proc en) '())) | |
(else (cons (proc st) | |
(make-list proc | |
(+ st 1) | |
en))))) | |
(reduce + 0 (make-list (lambda (n) (+ 1 (* 2 n))) 0 49)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment