pub enum Fold {
Sum,
Max,
Custom(Path),
}Expand description
WHICH FOLD an election declared — a shipped CITIZEN by its word, or a type by its PATH.
§Two spellings, and the split is the crossing this whole family is built on
semantics(fold(sum)) names one of the framework’s own, BARE and in parentheses, which is the
spelling every framework-owned mechanism word in this grammar takes — dedup(hash) is the same
shape one family over. semantics(fold = "app::MyFold") names a type the DECLARING CRATE owns,
QUOTED, which is the spelling every reference to somebody else’s declaration takes. So the
closed half and the open half are told apart by the shape of the value rather than by a rule a
reader has to remember: mint bare, refer quoted.
§The shorthand’s vocabulary is the DEFAULT-ABLE citizens, and that is not an arbitrary two
The emission builds a declared fold through Default — it holds a word or a path and no value
— so a citizen reachable by word is one that can be built from nothing. Sum and Max are; a
Weighted is not, its weights being checked against a query the declaration cannot see. Mean
is not a citizen at all: the word is withdrawn, and a fold that divides is one somebody writes
where they can see their own absences. Both are refused BY NAME rather than as unknown words,
because an author who wrote either had a coherent idea.
Variants§
Sum
fold(sum) — Σⱼ bⱼ, the shipped default, named explicitly.
Max
fold(max) — maxⱼ bⱼ.
Custom(Path)
fold = "app::MyFold" — a type the declaring crate owns, carried VERBATIM and resolved nowhere
in this crate: a path naming nothing is E0412 at the string its author wrote, and a type
that does not fold this engine’s currency is E0277 where the fold is constructed.