On Mon, Jun 14, 2010 at 8:01 AM, David Ward Lambert <[email protected]> wrote: > intersect =: -.^:2 NB. I've overlooked a set intersection > NB. primitive or phrase?
I usually use this, but yours works too: intersect=: e.#[ NB.intersect=: e.~#] NB. would work equally well, but uses the order and multiplicity of the other set 12 4 10 1 3 8 7 0 intersect 3 15 8 2 7 12 4 6 12 4 3 8 7 Ambrus ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
