I had high hopes for the functions of Key (particularly #/.~ M) for tallying
the keys in a character matrix. Playing with it, and replacing verb # with
others (< or { or ;) just to try to better understand its behavior, answered
one question that I had: was this some serendipitous marriage of a verb and an
adverb, or some special code that needed some un-useful combination of symbols
to invoke. It seems to be the latter (notice when I briefly considered trying
“#” as a substitute verb).
So a couple of new questions occurred:
• Why insist that the arguments need to agree in size. Since the result is the
length of the Nub of x, which is typically less than the rows of the arguments,
who cares?
* Why isn’t the typical behavior of dyadic iota followed, where arguments of y
not found in x are counted “off the end” of the size of the nub of x? In that
case, Y could be compared to a completely different x, perhaps revealing no
matches at all with a reset of vector of (0$#x),#y. (My J is so poor I am
probably saying that wrong, but hopefully you can guess what I mean.)
Would this improve the expression, or am I just flaunting my ignorance?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm