I’m probably misunderstanding the force of your example. But put
v=.(+([[[:echo;)'=';[;'+';]) Then (] F:.v) i.4 ┌─┬─┬─┬─┬─┐ │1│=│1│+│0│ └─┴─┴─┴─┴─┘ ┌─┬─┬─┬─┬─┐ │3│=│2│+│1│ └─┴─┴─┴─┴─┘ ┌─┬─┬─┬─┬─┐ │6│=│3│+│3│ └─┴─┴─┴─┴─┘ 1 3 6 (] F:.(v~)) i.4 ┌─┬─┬─┬─┬─┐ │1│=│0│+│1│ └─┴─┴─┴─┴─┘ ┌─┬─┬─┬─┬─┐ │3│=│1│+│2│ └─┴─┴─┴─┴─┘ ┌─┬─┬─┬─┬─┐ │6│=│3│+│3│ └─┴─┴─┴─┴─┘ 1 3 6 Both give the same result. > On 3 Jul 2020, at 11:47 am, Xiao-Yong Jin <[email protected]> wrote: > > >> On Jul 2, 2020, at 3:18 PM, Piet de Jong <[email protected]> wrote: >> >> My issue is not with x and y insofar as (u F:. v) is concerned. I agree it >> makes sense for x to be 'control information/initial condition' and y the >> ’data’. >> >> My concern is with x and y insofar as v is concerned. Each item in y for >> the verb (u F:. v) now becomes x for the verb v. So the data items y >> become x’s from v’s point of view. > > It's consistent with the existing primitives. > > ]F.:(+([[[:echo;)'=';[;'+';]) i.4 > ┌─┬─┬─┬─┬─┐ > │5│=│2│+│3│ > └─┴─┴─┴─┴─┘ > ┌─┬─┬─┬─┬─┐ > │6│=│1│+│5│ > └─┴─┴─┴─┴─┘ > ┌─┬─┬─┬─┬─┐ > │6│=│0│+│6│ > └─┴─┴─┴─┴─┘ > 6 > (+([[[:echo;)'=';[;'+';])/i.4 > ┌─┬─┬─┬─┬─┐ > │5│=│2│+│3│ > └─┴─┴─┴─┴─┘ > ┌─┬─┬─┬─┬─┐ > │6│=│1│+│5│ > └─┴─┴─┴─┴─┘ > ┌─┬─┬─┬─┬─┐ > │6│=│0│+│6│ > └─┴─┴─┴─┴─┘ > 6 > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
