Created
September 3, 2016 16:26
-
-
Save RyanGlScott/15093718ac50415a02dd34c8adb2cfb9 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
(define (map3 f ls) | |
(cond [(null? ls) | |
(values '() '() '())] | |
[else | |
(let-values ([(x1 x2 x3) (f (car ls))] | |
[(ls1 ls2 ls3) (map3 f (cdr ls))]) | |
(values (cons x1 ls1) (cons x2 ls2) (cons x3 ls3)))])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment