Brace containers
Start with value-producing blocks; revisit bounded loops after cells and scope.
Return a value from a block
{; ... } groups statements and returns its last value. The result below is 6. A space after the sigil keeps the form clear.
Maps ({=), sets ({|) and tuples ({:) have different meanings. Their focused collection lessons explain how to choose one.
Revisit for loops
The {@ ... } form repeats work. Read Cells and assignment and Scope and imports before using it to update state. The Bounded simulation lesson then shows an explicit stopping condition, a body and an update in one example.
Continue the short route with Functions and scope.