{[ -. -.) has been the idiom I think of for set intersection, for decades now.Translated to english: list without differences. As an aside, I know some people prefer to think of "sets" being represented by the unique list of members, but I think that SQL's treatment of relations (where uniqueness of results is only supported with the 'DISTINCT' keyword) fits rather well with the idea that set mechanics can be useful on entities which are not normalized. Thanks, -- Raul On Sun, Apr 25, 2021 at 12:06 PM Henry Rich <[email protected]> wrote: > > The i.-family is missing a member, I think. We have (x -. y) to find the > items of x not in y, but we don't have a way, supported by fast code, to > find the items of x that ARE in y. I'd like to fill that in. But what > is the best idiom, call it I? I have two requirements, apart from valid > result: > > * the definition should allow for precomputing the search table via at > least one of m&I and I&n > * the definition should give reasonable and explainable results when x > and y have different rank > > In addition, it would be nice if > > * repeated items in one argument, preferably x, are repeated in the > result, for symmetry with (x -. y) > > I have used two idioms for intersection: ([ -. -.) and (e. # [) . (e. # > [) is ill-behaved on arguments of different rank. So I am leaning toward > > ([ -. -.) > > for I . Any other ideas? > > Henry Rich > > > -- > This email has been checked for viruses by AVG. > https://www.avg.com > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
