开发者

In Prolog why does this query return this particular result

开发者 https://www.devze.com 2023-03-20 15:18 出处:网络
?- 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:
?- 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
0

精彩评论

暂无评论...
验证码 换一张
取 消