Add set index in list, and update lib+examples+tests
This commit is contained in:
parent
09ac16a42d
commit
3bccc227ba
12 changed files with 117 additions and 60 deletions
|
|
@ -34,3 +34,10 @@ assertEq("the, first, time".split(", "), ["the", "first", "time"])
|
|||
# list indexing
|
||||
assertEq([1, 2, 3].at(1), 2)
|
||||
assertEq(["a", "b", "c"].at(2), "c")
|
||||
|
||||
# mutating list
|
||||
a := [1, 2, 3]
|
||||
assertEq(a, [1, 2, 3])
|
||||
|
||||
a[1] = 4
|
||||
assertEq(a, [1, 4, 3])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue