Raul, Thank you for the pointer to what an API is.
I have had your question about sequences and sets in the back of my mind. Notice (last example of my previous post) that because of the way verb sortset is defined, verb realset leaves untouched nonsets at all levels. Thus the present model handles sets with nonset elements by determining equality of nonsets with Match -: . When I am thinking about problems involving sequences and sets I do not know how handle the fact that in my model every set is a sequence. For what it is worth, we can keep a sequence like 3;1;4 from being a set by repeating the last element, representing 3;1;4 by 3;1;4;4 -- the duplication makes it a nonset. Kip Raul Miller wrote: > On Fri, Aug 14, 2009 at 11:51 PM, Kip Murray<[email protected]> wrote: >> I AGREE as you will see. I prefer a set to be either 0$<1 or a list of boxes >> without duplicates. > > Let us imagine that you have unsorted lists representing sets. > > Let us also imagine that you have a set of sequences of sets of sequences > of sets. > > How can you determine if one such set is a subset of another such set? > > If your representation of sets had used sorted lists, the answer would > be the same as for any other question involving subsets. But if you > use unsorted lists, you must introduce special code which knows > about this specific application domain, to sort your sets (level 4, 2 and 0) > just before you make your comparison. > > Note also that if you use realset on the sequences (level 3 and 1) > that you will sometimes be treating sequences as identical which > were different. > > The sequence 1 0 1 0 1 is different from the sequence 0 1 0 1 0. > Likewise, the sequence {{}}, {}, {{}}, {}, {{}} is different from > the sequence {}, {{}}, {}, {{}}, {}. And, so on... > >>> Nor does it define an API. >> > >>> It's sort of half-way inbetween. >> WHAT'S AN API? (I'm serious, I do not know.) > > http://en.wikipedia.org/wiki/Api > >> Following a plan of Fraser's for a much broader context (set = any array), > > I do not see the benefit in this form of generality. > > I mean, yes, I can see that the array ?100#2 can represent a set, and > so can i.2 3 4 5 6, but I do not see any value in introducing complexities > so that I can manipulate them with the same primitives. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
