MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Fold

Method Fold

cel/macro.go:112–112  ·  view source on GitHub ↗

Fold creates a fold comprehension instruction. - iterVar is the iteration variable name. - iterRange represents the expression that resolves to a list or map where the elements or keys (respectively) will be iterated over. - accuVar is the accumulation variable name, typically parser.AccumulatorNam

(iterVar string,
		iterRange *exprpb.Expr,
		accuVar string,
		accuInit *exprpb.Expr,
		condition *exprpb.Expr,
		step *exprpb.Expr,
		result *exprpb.Expr)

Source from the content-addressed store, hash-verified

110 // environment in the step and condition expressions. Presently, the name __result__ is commonly
111 // used by built-in macros but this may change in the future.
112 Fold(iterVar string,
113 iterRange *exprpb.Expr,
114 accuVar string,
115 accuInit *exprpb.Expr,

Callers 1

TestCustomMacroFunction · 0.65

Implementers 1

adaptingHelpercel/macro.go

Calls

no outgoing calls

Tested by 1

TestCustomMacroFunction · 0.52