If I want to XOR two arrays (~:), I run into a problem if the two arrays are of
different length.
So before XORing I use my "pad" dyadic verb which pads zeros onto the front of
the right argument (which is assumed to be the shorter array).
pad =: ((#&0)@:(([: # [) - ([: # ]))) , ]
I imagine this problem is common, so is there a standard verb to do this? I
think my verb is not the most elegant, and it has the deficiency of assuming
the right argument is the shorter.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm