Skip to main content
This chapter continues the shared-state manual.

Building a log from first principles

A message log demonstrates a sequence field and append:
The poll uses a map and put; the log uses a sequence and append. A few primitives produce substantially different structures.

Derived collection expressions

Views and transitions derive values without redundant fields:
Collections can be transformed:
These operations traverse finite collections and are serializable; the current interpreter does not impose general collection-size or execution-cost limits. choose, and, and or short-circuit so guarded lookups are safe.

Completion and close

A machine can say when enough information has arrived:
Some results are computed only at close:
Before close, a view might reveal only a submission count. After close, it can reveal choices and results. Closing is an audited atomic transition.