On Tue, Aug 4, 2009 at 10:58 PM, Fraser
Jackson<[email protected]> wrote:
> I think the following function will achieve that by sorting into a J sort
> order.  That provides a standard form to simplify testing.  Raul might
> provide a tacit form.
>
>   sortSet =: 3 : 0
> s =. y
> for_k. i. >: L. y do.   s =. Set L:k s end.
> )

We can provide tacit forms easily enough.  For example:

Set=: /:~...@~.
sortSetR=: Set@($:&.>^:(*...@l.))

   (sortSet -: sortSetR) 5!:2 <'sortSet'
1

But note that this assumes that if you are working with
sets of sets, only level 0 items of arrays are anything
other than sets.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to