How to extend this abstraction where the numbers of lists are unknown instead of only two?
Code: Select all
(define (list-map op lst1 lst2)
(map (fn (x y) (op x y)) lst1 lst2))
I should be able to call
(list-map + '(1 2 3) '(3 4 4))
or
(list-map + '(1 2 3) '(5 6 7) '(8 9 10))
or even more number of lists as arguments