Odd behaviour with cons
Garklein opened this issue · comments
Garklein commented
When I run the query
A=[a,a], A=[_|As], B=[b|As], write(B), length(B,L).
I get
[b] A = "aa", As = "a", B = "ba", L = 3.
However, I expect it to output [b,a]
instead of just [b]
, and for L
to be 2
.
Peter commented
In regard to the "[b]" case, I have "[b,a]".
My Scryer version is 2fdbb94 (compiled using: cargo build --release):
?- A=[a,a], A=[_|As], B=[b|As], write(B), length(B,L).
[b,a] A = "aa", As = "a", B = "ba", L = 3, unexpected: L = 3.
% expected-but-not-found: [b,a] A = "aa", As = "a", B = "ba", L = 2.
Peter commented
But "[b]" with a version 6417658:
?- A=[a,a], A=[_|As], B=[b|As], write(B), length(B,L).
[b] A = "aa", As = "a", B = "ba", L = 3, unexpected.
Markus Triska commented
Mark Thom commented
I couldn't reproduce the incorrect [b]
printing either but I did correct length(B,L)
.
Garklein commented
Thank you!