OMG -- nub, *of course*.  I must be losing my marbles.

My apologies for forgetting it after 7 freakin decades!!!

Thanks Bob

Pete


On 7/26/23 16:24, 'robert therriault' via Programming wrote:
Hey PA,

I think that nub ~. is what you are looking for, although nub-sieve ~: might be 
useful as well.

     perms 12
2 2 3
2 3 2
2 2 3
2 3 2
3 2 2
3 2 2
    ~. perms 12 NB. unique items in order of appearance
2 2 3
2 3 2
3 2 2
    ~: perms 12 NB. mask of unique items
1 1 0 0 1 0
Cheers, bob

On Jul 26, 2023, at 13:15, 'PMA' via Programming<programm...@jsoftware.com>  
wrote:

perms =: 3 : 0
   n=: !N=: $q:y
   (i.n) A. q:y
)
----------------------------------------------------------------------
For information about J forums seehttp://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to