Slots & values

"Changing" a list means rebinding

Reflex check: in Python or JS, xs.append(4) mutates xs in place. Here it can’t — nothing ever mutates in place. So how do you grow a list?

You compute the new value and rebind:

Each .append() hands back a brand new list; the = is what makes todos point at it. Skip the rebind — just todos.append("dishes"); on its own — and todos never gets the memo.

That’s cheaper than it sounds: Ascent shares structure under the hood, so .append() isn’t secretly copying the whole list every time.

This is the biggest daily reflex to retrain coming from Python or JS: no method call ever changes a collection by itself — you always rebind. Your turn: start from your own mut list and build it up across a couple more rebinds.