我有这段代码:
% Family tree
female(pen).
male(tom).
male(bob).
female(liz).
female(pat).
female(ann).
male(jim).
parent(pam, bob).
parent(tom, bob).
parent(tom, liz).
parent(bob, ann).
parent(bob, pat).
parent(pat, jim).
我收到此错误:
Warning: Clauses of female/1 are not together in source-file
Warning: Clauses of male/1 are not together in source-file
这个错误的目的是什么?
我的意思是,文件确实编译和运行得很好,我知道错误的含义。但为什么?
这只是执行最佳实践的通知吗?
我对逻辑编程很陌生。
谢谢!