scryer-prolog
scryer-prolog copied to clipboard
Unexpected multiple solutions of setof/3
This query unexpectedly produces multiple answers:
?- setof(X, phrase((...,seq(X)),"abc"), Xs).
Xs = [[]]
; Xs = ["abc"]
; Xs = ["bc"]
; Xs = ["c"].
But the next succeeds deterministically and behaves as expected:
?- setof(X, phrase(...,"abc",X), Xs).
Xs = [[],"abc","bc","c"].
I'm struggling to find a minimal example.