Concatenating Lists

Date:    Thu, 10 Aug 1995 10:30:09 -0700
From:    Ron Bearry 
Subject: Re: copying a list into new variable
I know the original problem was solved in a different post. But on a similar note, these could come in handy too.
on ConcatPropertyList list1, list2
-- concatenate two property lists.
if not listP(list1) then set list1 = [:]
  if not listP(list2) then set list2 = [:]
  set c = count(list2)
  if c then
    repeat with i = 1 to c
      addProp(list1, getPropAt(list2, i), getAt(list2, i))
    end repeat
  end if
end

on ConcatLinearList list1, list2
  -- concatenate two linear lists.
 if not listP(list1) then set list1 = [list1]
  if not listP(list2) then set list2 = [list2]
  if count(list2) then
    repeat with i in list2
      append(list1, i)
    end repeat
  end if
end