Created
April 28, 2010 21:22
-
-
Save kana/382741 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
; Q. Is there more polished form to write this procedure? | |
(let1 f (lambda (x y) (cons x y)) ; Actually, f is an arbitrary procedure. | |
(map (lambda (outer-element) | |
(map (lambda (inner-element) | |
(f inner-element outer-element)) | |
'(a b c))) | |
'(1 2 3))) | |
; ==> ((a . 1) (b . 1) (c . 1) | |
; (a . 2) (b . 2) (c . 2) | |
; (a . 3) (b . 3) (c . 3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment