<- PRPL reference <- Lists

DeepCopyList

ArgumentsResultNotation
original copy [ list - list ]

Description

Creates a copy of a list with the same contents. Unlike CopyList, if the copied list contains other lists, those lists will be copied as well (and if those lists contain other lists, even those will be copied, etc, etc). See Copy vs Deep Copy for more info.

Examples

Split("A,B,C" ",") ->listInner
Split("1,2,3,4,5,6" ",") ->list
<-list <-listInner AppendToList
 
<-list CopyList ->listCopy
<-list DeepCopyList ->listDeepCopy
SetListElement(<-listInner 0 "banana") 
SetListElement(<-list 0 "orange") 

Trace(<-list) 
Trace(<-listCopy) 
Trace(<-listDeepCopy)