Combine two lists of 3 characters into 3 pairs
问题 I'm having a little trouble with this. Basically, I need a procedure comb that takes two lists (comb '(a b c) '(1 2 3) and returns ('a 1)('b 2)('c 3) . I came up with a part of the cod which returns the first pair (define some-letters '(a b c)) (define some-nums '(1 2 3)) (define x (first (foldr cons empty some-letters))) (define y (first (foldr cons empty some-nums))) (define (comb list1 list2) (cond [(empty? list1) empty] [(empty? list2) empty] [else (list x y)])) Now, I tinkered around a