In Prolog why does this query return this particular result
?- assert(p(a)),assert(p(b)),p(X).
X = a
yes
Wha开发者_如何学运维ts the effect of this query and why does it return this particular result?
It is as if you queried the following source:
input.pl:
p(a).
p(b).
?- p(X)
X = a
yes
精彩评论