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

Function Matches

factstore/factstore.go:377–384  ·  view source on GitHub ↗

Matches matches a list of patterns against a list of base terms.

(pattern []ast.BaseTerm, args []ast.BaseTerm)

Source from the content-addressed store, hash-verified

375
376// Matches matches a list of patterns against a list of base terms.
377func Matches(pattern []ast.BaseTerm, args []ast.BaseTerm) bool {
378 for i, t := range pattern {
379 if _, ok := t.(ast.Constant); ok && !t.Equals(args[i]) {
380 return false
381 }
382 }
383 return true
384}
385
386// IndexedInMemoryStore provides a simple implementation backed by a three-level map.
387// For each predicate sym, we have a separate map, using hash of the first argument and then

Callers 10

GetFactsMethod · 0.85
GetFactsMethod · 0.85
GetFactsMethod · 0.85
GetFactsMethod · 0.85
GetFactsAtMethod · 0.85
GetFactsDuringMethod · 0.85
GetAllFactsMethod · 0.85

Calls 1

EqualsMethod · 0.65

Tested by

no test coverage detected