Created
November 25, 2018 21:14
-
-
Save edw/8cb326c0490be9b2f03f3472ab833f64 to your computer and use it in GitHub Desktop.
A simple MAP implementation
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
| (define (map proc xs) | |
| (let loop ((xs xs) (result '())) | |
| (if (null? xs) (reverse result) | |
| (loop (cdr xs) | |
| (cons (proc (car xs)) result))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment