From: Arielle on
Hello:

I need to join some lists in only one.
I do the following:

list1=["A","B"]
list2=["C","D"]
list3=["E","F"]

list123=list1&list2&list3
put list123
-- "["A", "B"]["C", "D"]["E", "F"]"


I need this:
list123=["A","B","C","D","E","F"]
Can you help me please?
thank you very much


From: Dave C on
Maybe there is a more direct way, but it is easy enough to make a custom
handler.

--------------------------------
on concatentateLists listofLists
returnList = []
repeat with j in listofLists
repeat with k in j
returnList.add(k)
end repeat
end repeat
return returnList
end
---------------------------------


Testing results

-- Welcome to Director --
list1=["A","B"]


list2=["C","D"]


list3=["E","F"]


put concatentateLists([list1,list2,list3])
-- ["A", "B", "C", "D", "E", "F"]
From: Dave C on
You can even make the handler name spell the word concatenate correctly
if you so desire. ;-)
From: Chunick on
and it's quicker to use .append() instead of .add() ... fractions of a millisecond, but it can add up ;-)