Effects
Some kinds change the world: log writes a line, and write writes a value to the store. These kinds are on the run side. Their cards have a magenta edge. Each effect becomes a numbered ticket in the world, in the order of the effects.
The glyphs so far: 15, 3 new on this page
- 42Data: a value without a type
- numberA document: the tab is its type42
- numberA dashed tab: the container declares the type42
- addParts: a card inside a cardnumber1number2
- kindA kind: a document of type kind
- OKDA rung: own, kind or default
- 3A port: the result of a document
- 0A sealed part: an evaluator cannot read it
- #NAME?An error value, in a red port
- numberaA name tag: a binding for later steps3
- refA reference: a path from a root of the contextnamesa
- ifNot evaluated: a part that its parent did not need“yes”testbooltruetruethentext“yes”“yes”elsetext“no”not evaluated
- ▸logThe run side: a magenta edge, and an effectnew“hi”text“hi”“hi”
- 1log“hi”An effect: a numbered ticket in the worldnew
- logA capability: an effect that a term can causenew
Nothing started yet. Select Next or Play.
- 1▸logtext“start”
- 2▸writetotaldatakey“total”valueaddnumber2number3
- 3▸logrefnamestotal
Only the effects have numbers. For pure parts, the order of the evaluation does not change a result. For effects, the order is the meaning.
Capabilities
Section titled “Capabilities”A term can cause an effect only when its context has the capability for that effect. A construct gives its parts the same capabilities or fewer. The kind pure gives its part no capability. Thus an effect inside pure fails with #CAP!, and the world does not change.
The evaluation of pure ends with the error #CAP!: The context has no capability for the effect log.
Select the log card, and look at the panel. Its context has no capability. The capability is a part of the context, as a name is.