Answer architecture round 3, stability round 1 and product-owner round 1: CalcName and proven.OfCalc for one meaning per name, a lazy load placed where its lookup found it, DataType's constants typed under it, and cover printing the module's total

This commit is contained in:
2026-10-05 15:53:56 +02:00
committed by Lillem4n
parent 679bd43c7c
commit 4f484cd780
11 changed files with 34 additions and 33 deletions
+3 -3
View File
@@ -64,9 +64,9 @@ var builtins = withTransforms(map[string]builtin{
cc := a[0]
return func(s *drawstate.State, _ string, _ []string) string { return iban(s, cc) }
}},
"date": {arity: -1, checkArgs: dateArgs, prep: datePrep},
"time": {arity: -1, checkArgs: timeArg, prep: timePrep},
Calc: {arity: -1, checkArgs: checkCalc, prep: calcPrep, operands: calcOperands, noRefOperands: true},
"date": {arity: -1, checkArgs: dateArgs, prep: datePrep},
"time": {arity: -1, checkArgs: timeArg, prep: timePrep},
CalcName: {arity: -1, checkArgs: checkCalc, prep: calcPrep, operands: calcOperands, noRefOperands: true},
// seq is the one stateful builtin: a per-generator counter from 1, advancing on
// each call. An optional name selects an independent counter; no name uses the
// default one. Deterministic by construction, so seeded output stays stable.