leftHand(empty).
rightHand(empty).
inHands :-
write("Left hand:"),
nl,
leftHand(X),
tab(2),
write(X),
nl,
nl,
write("Right hand:"),
rightHand(Y),
tab(2),
write(Y),
nl.
I expect inHands.
to return something like this:
Left hand:
empty
Right hand:
empty
However, this is what I saw:
24 ?- inHands.
[76, 101, 102, 116, 32, 104, 97, 110, 100, 58]
empty
[82, 105, 103, 104, 116, 32, 104, 97, 110, 100, 58] empty
true.
What am I doing wrong here?