Matches matches a list of patterns against a list of base terms.
(pattern []ast.BaseTerm, args []ast.BaseTerm)
| 375 | |
| 376 | // Matches matches a list of patterns against a list of base terms. |
| 377 | func 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 |
no test coverage detected