| ▲ | RodgerTheGreat 4 hours ago | |
In Lil[0], this is how ordinary assignment syntax works. Implicitly defining a dictionary stored in a variable named "cat" with a field "age":
Defining "l" as in the example in the article. We need the "list" operator to enlist nested values so that the "," operator doesn't concatenate them into a flat list:
Updating the "age" field in the nested dictionary. Lil's basic datatypes are immutable, so "l" is rebound to a new list containing a new dictionary, leaving any previous references undisturbed:
There's no special "infix" promotion syntax, so that last example would be:
[0] http://beyondloom.com/tools/trylil.html | ||