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

Method ApplySubst

ast/ast.go:1023–1029  ·  view source on GitHub ↗

ApplySubst returns the result of applying given substitution to this atom.

(s Subst)

Source from the content-addressed store, hash-verified

1021
1022// ApplySubst returns the result of applying given substitution to this atom.
1023func (a Atom) ApplySubst(s Subst) Term {
1024 newargs := make([]BaseTerm, len(a.Args))
1025 for i, t := range a.Args {
1026 newargs[i] = t.ApplySubstBase(s)
1027 }
1028 return Atom{a.Predicate, newargs}
1029}
1030
1031// IsGround returns true if all arguments are constants.
1032func (a Atom) IsGround() bool {

Callers

nothing calls this directly

Calls 1

ApplySubstBaseMethod · 0.65

Tested by

no test coverage detected