Baseline: tree as shared
This commit is contained in:
1679 files changed
+1024562
No files matched your search
@@ -0,0 +1,13 @@
|
||||
def print_list(list: List[Int]):
|
||||
print(list.__str__())
|
||||
|
||||
def mutate_copy(l: List[Int]) -> List[Int]:
|
||||
# def creates an implicit copy of the list because it's mutated
|
||||
l.append(5)
|
||||
return l
|
||||
|
||||
def main():
|
||||
var values: List[Int] = [1, 2, 3, 4]
|
||||
|
||||
values = mutate_copy(values)
|
||||
print_list(values)
|
||||
Reference in new issue
Block a user