Created
November 16, 2009 21:59
-
-
Save kidd/236363 to your computer and use it in GitHub Desktop.
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 (build-list x) | |
(define (range a b) | |
(if (> a b) '() | |
(cons a (range (+ a 1) b)))) | |
(range 1 x)) | |
(define (my-cool-reverse l) | |
(define (my-reverse l1 l2) | |
(if (null? l1) | |
l2 | |
(my-reverse (cdr l1) | |
(cons (car l1) l2)))) | |
(my-reverse l '())) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment