Choices
The evaluator of if shows why an evaluator gets its parts sealed and not evaluated. It evaluates the test first. Then it evaluates only the branch that the test selects. The other branch is not evaluated, and its card says so.
The glyphs so far: 12, 1 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 neednew“yes”testbooltruetruethentext“yes”“yes”elsetext“no”not evaluated
The context has the name size with the value 12. Thus the test is true, and the log in the other branch does not happen.
The evaluation of if ends with "big".
With the size 4, the test is false. The evaluator evaluates the branch else, and the log happens.
The evaluation of if ends with "small".
- 1log“small”
Each evaluator decides
Section titled “Each evaluator decides”A condition is not a special part of the language. It is a kind with an evaluator, as add is. Any evaluator can decide which parts to evaluate, how many times, and in which context. A loop, a retry and a handler that waits for an event are evaluators of the same form.