Or just: 1<+/=/~t
1 1 0 1 1 1 0 1 0 1 0 Skip Cave Cave Consulting LLC On Sat, Dec 29, 2018 at 7:24 PM Jimmy Gauvin <[email protected]> wrote: > Hi, > > I had started experimenting with nub sieve : > > t e. t#~ -. ~:t > 1 1 0 1 1 1 0 1 0 1 0 > > and index (but it has a problem with the first instance of duplicate > elements): > > 0 (t i. t) } (#t)#1 > 0 0 0 0 1 1 0 1 0 1 0 > > but applying the sieve twice, plus a nand, nails it right on the head. > > Thanks again > > > On Sat, Dec 29, 2018 at 7:44 PM Roger Hui <[email protected]> > wrote: > > > t > > 3 5 4 2 3 5 6 2 9 2 8 > > (~: *: ~:&.|.) t > > 1 1 0 1 1 1 0 1 0 1 0 > > > > > > > > On Sat, Dec 29, 2018 at 4:33 PM Jimmy Gauvin <[email protected]> > > wrote: > > > > > Hi, > > > > > > is there a better way tag duplicates in a list than the following > (which > > > smells of overkill) : > > > > > > t=:3 5 4 2 3 5 6 2 9 2 8 > > > t e. (~.t) #~ 1~: #/.~t > > > 1 1 0 1 1 1 0 1 0 1 0 > > > > > > Thanks, > > > > > > Jimmy > > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
