MCPcopy
hub / github.com/google/mangle / IsReducerFunction

Function IsReducerFunction

builtin/builtin.go:204–212  ·  view source on GitHub ↗

IsReducerFunction returns true if sym is a reducer function.

(sym ast.FunctionSym)

Source from the content-addressed store, hash-verified

202
203// IsReducerFunction returns true if sym is a reducer function.
204func IsReducerFunction(sym ast.FunctionSym) bool {
205 if _, ok := ReducerFunctions[sym]; ok {
206 return true
207 }
208 if _, ok := ReducerFunctions[ast.FunctionSym{sym.Symbol, -1}]; ok {
209 return true // variable arity
210 }
211 return false
212}
213
214// Decide evaluates an atom of a built-in predicate. The atom must no longer contain any
215// apply-expressions or variables.

Callers 2

evalDoFunction · 0.92
CheckRuleMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected