Apply apply¶
Applies a function to corresponding elements from multiple lists, using each list as an argument source.
Syntax¶
Examples¶
Element-wise operations on multiple lists¶
↪ (apply (fn [x y] (+ x y)) [1 2 3] [4 5 6])
[5 7 9]
↪ (apply (fn [x y z] (+ x y z)) [1 2 3] [10 20 30] [100 200 300])
[111 222 333]