| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: More on lists and sets
paul c wrote:
> Mikito Harakiri wrote:
> > ...
> > Definition. List intersection is a cartesian product with equijoin of
> > the list nodes and lexicographic order. Example: 1->2->1 /\ 2->1->2 =
> > 2->1->1->2
> > ...
>
> I'm struggling with the definition. If 1 and 2 stand for nodes, aren't
> the two lists circular? If that's so, aren't there multiple answers?
> (or one answer comprising two lists?)
>
The usual list intersection opeartion (L = L1 intersect L2) is defined as
L = [x | x <- L1, x in L2]
that is, L retains the elements of L1, in their original order, that are present in L2.
E.g. [1, 2, 2, 3, 4, 4] intersect [2,4] => [2,2,4,4]
or
[1,2,1] intersect [2,1,1,2] => [1,2,1]
This:
1->2->1 /\ 2->1->2 = > 2->1->1->2
does not make any obvious sense.
> pc
Received on Wed Mar 22 2006 - 09:15:34 CST
![]() |
![]() |