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

Equality operator #3

Open
cameel opened this issue Aug 16, 2020 · 0 comments
Open

Equality operator #3

cameel opened this issue Aug 16, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@cameel
Copy link
Collaborator

cameel commented Aug 16, 2020

We really need an equality operator. In the (tic tac toe demo](https://github.com/leonardoalt/SolPrologV2/tree/master/src/demo) I had to work around it with clauses like these:

same(., .).
same(x, x).
same(o, o).
same([], []).
same([H1|T1], [H2|T2]) :- same(H1, H2), same(T1, T2).

In addition to requiring more code, they're also very heavy to evaluate in the current implementation due to deep nesting. Replacing it with an operator that just does term comparison would speed up the demo a lot.

@cameel cameel added the enhancement New feature or request label Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant