Last active
August 29, 2015 14:25
-
-
Save chrisbodhi/4013c351d917ea44d860 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
| ; #1 | |
| (define (sequence low high step) | |
| (let ([next (+ low step)]) | |
| (if (>= high low) | |
| (cons low (sequence next high step)) | |
| null))) | |
| ; #2 | |
| (define (string-append-map xs suffix) | |
| (map (lambda (x) | |
| (string-append x suffix)) | |
| xs)) | |
| ; #3 | |
| (define (list-nth-mod xs n) | |
| (cond [(< n 0) (error "list-nth-mod: negative number")] | |
| [(null? xs) (error "list-nth-mod: empty list")] | |
| [#t (length xs)])) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
; WIP on #3