3 ms·
I might be missing something here, but what about this (I didn't even attempt to run this)? Basically, just call map1 and map2 with a single-number interval, an
by elijahbuck 18y ago
I might be missing something here, but what about this (I didn't even attempt to run this)? Basically, just call map1 and map2 with a single-number interval, and then apply the function from map3 to that result. This avoids making a local copy, but does require a lot of function calls.
(defun compmap (fn mapper1 mapper2 start end)
(cond ((= start end) '())
(else (cons
(fn start (+ (mapper1 start start) (mapper2 start start)))
(compmap fn mapper1 mapper2 (+ start 1) end)))))