Re: Rogue list?
Re: Rogue list?
- Subject: Re: Rogue list?
- From: Michelle Steiner <email@hidden>
- Date: Thu, 10 May 2001 19:40:02 -0700
On 5/10/01 6:24 PM, Michelle Steiner <email@hidden> wrote:
>
Oh, here are some utilities I worked up. I'm probably duplicating
>
someone's earlier efforts, but so what? <g>
here's another; it returns all unique items--i.e., items that are in
either list but not in both lists.
set a to {1, 2, 3, 4}
set b to {3, 4, 5, 6}
set d to unique(a, b)
--> {1, 2, 5, 6}
to unique(a, b)
set c to {}
repeat with loop in a
if loop is not in b then
set end of c to contents of loop
end if
end repeat
repeat with loop in b
if loop is not in a then
set end of c to contents of loop
end if
end repeat
return c
end unique
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------