Others have provided solutions for the "unique" that you requested.
Here is a solution that gives a boolean list of all the unique (occur
exactly once) elements.
unique=: [:-. ]e. -.@:~: #]
   unique box
0 0 1

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Jimmy Miller
> Sent: Wednesday, 13 June 2007 08:10
> To: [email protected]
> Subject: [Jprogramming] Finding unique strings in a box
> 
> If I have a box of strings such as this:
> 
> box =. 'ab';'ab';'bc'
> 
> What's the best way to tell if a string within the box is 
> unique?  For example:
> 
> 'bc' unique box NB. Should return true
> 'ab' unique box NB. Should return false
> 
> --
> <a 
> href="http://www.spreadfirefox.com/?q=affiliates&id=153516&t=1
"><textarea
> rows="3" cols="40">Get Firefox!</a>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to