SolPrologV2 icon indicating copy to clipboard operation
SolPrologV2 copied to clipboard

Equality operator

Open cameel opened this issue 5 years ago • 0 comments

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 avatar Aug 16 '20 15:08 cameel