Last active
October 15, 2016 04:24
-
-
Save etra0/5a339027764d1de3d813e8e602d5d6d6 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
#lang scheme | |
(define range | |
(lambda (future_list) | |
(if (list? future_list) | |
(if (= (car future_list) 0) | |
future_list | |
;else | |
(range (cons (- (car future_list) 1) future_list)) | |
) | |
;else | |
(range (cons future_list null)) | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment