Skip to content

set/2 predicate in chapter 6 practical session relies on negation #59

Open
@TV4Fun

Description

@TV4Fun

Specifically, it uses the not/1 predicate, which is not given in the text, and negation in general is not discussed until chapter 10. Unfortunately, I don't think there's a way to cleanly answer this without negation. You can write it in a way that the first result of set/2 will be the one you are looking for, but subsequent results from set([...],X). will have duplicate entries, and queries to set([...],[...]). with duplicate entries in the second argument will succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions