And only you, Roger, well deserve the right to answer "Because I said so!" I was only considering the case of u=#, and remembering that #/. was described as in the i. family, and seeing that...
Well never mind. Sorry. > On Oct 13, 2019, at 7:50 PM, Roger Hui <[email protected]> wrote: > > >> >> why do the sizes of the x and y argument to Key need to match? > > Because the x u/. y key adverb is _defined_ so that > > - items of x specify keys for _corresponding_ items of y and > - u is applied to each collection of y having identical keys. > > You can argue that the definition should be something else, but it is not > debatable that if you are going to use u/. then items of x must have > corresponding items in y, that is, x and y must have the same number of > items, that is, {.$x must be the same as {.$y . x and y need not have the > same shape, but the leading element of their shapes must be the same. > > > >> On Sun, Oct 13, 2019 at 3:58 PM 'Jim Russell' via Programming < >> [email protected]> wrote: >> >> Rick: My ability to read tacit expressions is so poor that I overlooked >> the fact that the your quoted output did not come directly from the Key >> expression; silly me, I thought there was some form of the >> modifiers/arguments to Key that yielded the results of two inputs. >> >> (In contrast to your skill, it took be about a half a day to come up with >> the tacit dyad(?) mmjnn=:(; ,.) to glue together my trigram table and one >> result vector.) >> >> So I wonder if I dare ask again: >> why do the sizes of the x and y argument to Key need to >> match? >> >> (Thanks again for all the help!) >> >>>> On Oct 12, 2019, at 5:16 AM, Ric Sherlock <[email protected]> wrote: >>> >>>>> Or to summarise by trigram: >>>>> >>>>> (~.@; trig);|: <: #/.~&> supertrig >>>>> >>>>> +---+---+ >>>>> >>>>> |ggt|1 2| >>>>> >>>>> |gta|2 0| >>>>> >>>>> |taa|1 1| >>>>> >>>>> |aaa|2 0| >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
