Hello, I have a CHR as follows:
:- use_module(library(chr)).
:- chr_constraint try/1.
try(X), try(Y) <=> X == Y | writeln(succeed).
then I declared a constraint, but got an unexpected result:
?- try(A).
succeed
try(A).
The unexpected succeed seems to be because Prolog matches try(A) to both try(X) and try(Y). But does this make sense?
Thanks in advance! ![]()