Pete pete at
Thu Jun 23 01:58:53 EDT 2011

I may be wrong, but I don't think intersect solves the problem.  If I
understand the dictionary correctly, this will remove all the t1 keys that
do NOT match t2 keys so it does the opposite of what is needed.  Even if
intersect does remove t1 keys that DO match t2 keys, that won't help find
values in t2 that are not present in t1, so 5 in his original example would
be missed.

The sort solution seems to work but would it be necessary to set
wholeMatches to true?  If you had two lines:


... would 100 be taken as a duplicate with wholematches set to false?  Can't
tell from the dictionary.

Molly's Revenge <>

On Wed, Jun 22, 2011 at 10:02 PM, Mark Wieder <mwieder at>wrote:

> Dick-
> Wednesday, June 22, 2011, 9:19:57 PM, you wrote:
> > Even though it may not always be the fastest, lean code has some appeal:
> there's no loop.
> > function intersectionOfLists t1, t2
> >    split t1 by cr and tab
> >    split t2 by cr and tab
> >    intersect t1 with t2
> >    return the keys of t1
> > end intersectionOfLists
> ! Thanks ! I was wracking my brain trying to figure out how I could
> apply split in this situation. I *completely* forgot about the
> intersect command,
> --
> -Mark Wieder
>  mwieder at
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the Use-livecode mailing list