1
?- assert(p(a)),assert(p(b)),p(X).
X = a 
yes

Whats the effect of this query and why does it return this particular result?

false
  • 10,264
  • 13
  • 101
  • 209
General_9
  • 2,249
  • 4
  • 28
  • 46

1 Answers1

2

It is as if you queried the following source:

input.pl:

p(a).
p(b).

?- p(X)

X = a
yes
Heath Hunnicutt
  • 18,667
  • 3
  • 39
  • 62