I have two lists (with atoms of different types) and would like to apply a custom dyadic function in parallel, i.e. first element of the list a with first element of the list b etc.. The non-parallel way is to use the iterator ', which works just fine, but what is the parallel alternative?
You can avoid having to flip your data, which can be expensive, by composing the peach with each both
q) f:{x+y}
q) l1: 1 2 3
q) l2: 4 5 6
q) (f':)'[l1;l2]
5 7 9
q)\t:100000 (f':)'[l1;l2]
97
q)\t:100000 (f .) peach flip(l1;l2)
141
Without the peach this would just be a simple f'[l1;l2]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With