Hi,
I wonder if there is a simpler way to write a pj with uj-like semantics?
The behaviour of pj is more like an lj, keys on the L.H.S. are preserved and matching values from R.H.S. are added. More often than not, though, I need a pj with the semantics of uj, i.e., if a key is present on the R.H.S. but not on the L.H.S., it should be added to the final result. To illustrate this idea better, here is an example:
q)L:([K:
ab
c]V:100 200 300)q)R:([K:a
d]V:1000 2000)q)L pj RK| V-| ----a| 1100b| 200c| 300q)L uj RK| V-| ----a| 1000b| 200c| 300d| 2000q)L puj R /The would-be pj-uj comboK| V-| ----a| 1100b| 200c| 300d| 2000`
Thanks in advance.