Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TV4Fun opened this issue Dec 31, 2023 · 0 comments
Open

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

TV4Fun opened this issue Dec 31, 2023 · 0 comments

Comments

@TV4Fun
Copy link

TV4Fun commented Dec 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant