Skip to content

Instantly share code, notes, and snippets.

@kidd
Created November 16, 2009 21:59
Show Gist options
  • Save kidd/236363 to your computer and use it in GitHub Desktop.
Save kidd/236363 to your computer and use it in GitHub Desktop.
(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