If you want to match each operator separately in lists, use
((fn [ops & args] (map #(apply map %1 args) ops)) [+ - *] [1 2 3] [4 5 6] [7 8 9])
or if you want to change the order of the arguments
(map #(map %1 [1 2 3] [4 5 6] [7 8 9]) [+ - *])
Both give a result ((12 15 18) (-10 -11 -12) (28 80 162))
source
share