Added fib-memo.toy, fixed bugs until it worked

This commit is contained in:
2023-02-04 16:54:59 +00:00
parent 8d278077b1
commit 386201b6e9
7 changed files with 189 additions and 160 deletions

View File

@@ -30,13 +30,11 @@
//test nested indexing
{
var d = ["foo": ["bar": 0]];
var d = ["foo" : ["bar" : ["bazz" : ["fizz" : 5]]]];
d["foo"]["bar"] = 42;
d["foo"]["bar"]["bazz"]["fizz"] = 66;
print d;
assert d == ["foo": ["bar": 42]], "nested indexing failed";
assert d == ["foo": ["bar": ["bazz": ["fizz": 66]]]], "nested indexing failed";
}