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