---Sherlock, Ric wrote: > ---Graham Parkhouse wrote: > > sum=: 10 12 14 15 15 17 18 19 20 22 17 19 20 21 22 24 24 25 27 29 > > Next I would like to get a list of the indices of sum whose > > values only appear once, i.e. > > 0 1 2 6 13 17 18 19 > > > > Is there an altogether different way to get the result I want? > > Actually here is another way: > (] -. ] #~ -.@:~:)@:i.~ sum > 0 1 2 6 13 17 18 19
Or using hooks rather than forks: (-. (#~ -.@:~:))@:i.~ sum 0 1 2 6 13 17 18 19 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
