EvalAtom returns an atom with any apply-expressions evaluated.
(a ast.Atom, subst ast.Subst)
| 1306 | |
| 1307 | // EvalAtom returns an atom with any apply-expressions evaluated. |
| 1308 | func EvalAtom(a ast.Atom, subst ast.Subst) (ast.Atom, error) { |
| 1309 | args, err := EvalExprsBase(a.Args, subst) |
| 1310 | if err != nil { |
| 1311 | return ast.Atom{}, err |
| 1312 | } |
| 1313 | return ast.Atom{a.Predicate, args}, nil |
| 1314 | } |
| 1315 | |
| 1316 | // EvalBaseTermPair evaluates a pair of base terms. |
| 1317 | func EvalBaseTermPair(left, right ast.BaseTerm, subst ast.Subst) (ast.BaseTerm, ast.BaseTerm, error) { |