#1364 Fold_c says that the item keeps its final state
The section on when the condition is calculated said that with an attribute as the state each step is calculated twice, and that with a parameter or a unit as the state the steps are not calculated again. The second statement held only for states smaller than 128 bytes, which GeoDMS keeps in memory without interest, and both no longer describe the engine.
The section now says that the meta information of a fold_c item depends on data, so that determining the item, also in the GUI, calculates the steps. It says that the item keeps the state where fold_c stops, and the state before it, until its data is asked for, so that each step is calculated once, as in fold. It also says when those two states are released, and that an item whose data is never asked for keeps them until it is invalidated or the configuration is closed.
#1367 The step of fold and fold_c may hold variants
Fold and Fold_c say that the step, and the condition of fold_c, may be a function that holds variants, that the variant is chosen once, on the initial state, and that a later state that would choose another variant, or none, is an error. The applies-to lists accept a function whose variants each take two parameters (one for the condition), and say that a partial application of a function with variants is refused.
The examples and their outcomes were run as fn_test_fold_variant.dms on a local Release build with the engine change of #1367; the pages were not rendered on geodms.nl.
#1347 Fold and Fold_c: repeat a step, also in a function body
Two new pages describe the operators of GeoDMS 20.29.0 that repeat a step. Fold covers fold(domain, step, initial state), which applies a function once for each element of a unit, and instantiate fold(...), which makes the state after each step an item, also in a function body. Fold_c covers fold_c(step, condition, maxN, initial state), which applies the step while a condition holds and reports an error when it still holds after maxN steps, and says that with an attribute as the state the steps are calculated twice.
The script on the page convex-hull-example-script now repeats its step with fold_c, as examples/convex_hull.dms does, and the paragraphs under it explain the step, the condition and the ceiling maxN. For_each and Function-definition point to fold and fold_c for a repeated step in a function body, Map lists Fold among its related pages, and the sidebar lists both pages under map.