Skip to content

Unification persistent data structure #65

@hertzcodes

Description

@hertzcodes

Hello,
what does the comment mean here? you want a persistent map instead of allocating one each time?

// 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions