2

I have

assert(user(anna)).
assert(user(tom)).

but when I query

?- user(X).

I only get

X = anna.

Shouldn't I get another line saying X = tom as well?

false
  • 10,264
  • 13
  • 101
  • 209
Nevvea
  • 67
  • 4

1 Answers1

2

You need to type a semicolon after the first answer:

?- user(X).
X = anna ;
X = tom.
Matt
  • 4,029
  • 3
  • 20
  • 37
  • 2
    Semicolon or `SPACE`, which is much more convenient on many keyboard layouts. – mat Jul 26 '15 at 09:54