2023-05-24 22:32:54 +02:00
|
|
|
list := [1 2 3 4 5 6 7 8 9 ...]
|
2023-05-11 01:04:15 +02:00
|
|
|
|
2023-05-23 23:56:45 +02:00
|
|
|
// calling get on an &list will get a reference
|
|
|
|
&list.get(2).assume1() = 24
|
|
|
|
// calling get on a list will get a value
|
2023-05-24 22:32:54 +02:00
|
|
|
should_not_be_changeable := list.get(3).assume1()
|
2023-05-23 23:56:45 +02:00
|
|
|
&should_not_be_changeable = 24
|
2023-05-14 00:11:36 +02:00
|
|
|
|
|
|
|
if list.get(2) != [24] println("[!!] list.get(2) != 24 (was {0})".format(list.get(2).to_string()))
|
|
|
|
if list.get(3) == [24] println("[!!] list.get(3) == 24")
|
2023-05-11 01:04:15 +02:00
|
|
|
|
|
|
|
list.debug()
|