View Single Post
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 02-25-2010, 12:20 PM

Moving one list to another just requires a single method (as alice can't return a list through a function).

The code would look something like this (this is my own sort of pseudo-code that will make it understandable in Alice):

Code:
list1 = [1,2,3]
list2 = []
loop index = 0 up to but not including the size of list1 do
    insert item index from list1 to the end of list2
end
remove all items from list1 //remove if you want list1 to keep values
The output if you look at list1 and list2 will be:

list1 = []
list2 = [1,2,3]
   
Reply With Quote