Structure RCList Value.i List A.RCList() EndStructure Procedure Flatten(List A.RCList()) ResetList(A()) While NextElement(A()) With A() If \Value Continue Else ResetList(\A()) While NextElement(\A()) If \A()\Value: A()\Value=\A()\Value: EndIf Wend EndIf While ListSize(\A()): DeleteElement(\A()): Wend If Not \Value: DeleteElement(A()): EndIf EndWith Wend EndProcedure