google / google/mangle

Unification persistent data structure

Open
#65 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
157
PR merge metrics
No merged PRs in 30d

Description

Hello,
what does the comment mean here? you want a persistent map instead of allocating one each time?
```Go
// Not a built-in predicate. Call lookupFn.
lookupFn(p, func(fact ast.Atom) error {
// TODO: This could be made a lot more efficient by using a persistent
// data structure for composing the unionfind substitutions.
if newSubst, err := unionfind.UnifyTermsExtend(p.Args, fact.Args, subst); err == nil {
solutions = append(solutions, newSubst)
}
return nil
})
return solutions, nil
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.