5a19adf881
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1966 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
27 lines
314 B
Plaintext
27 lines
314 B
Plaintext
/*
|
|
s([female(f)],P).
|
|
P = 0.6 ?
|
|
s([male(f)],P).
|
|
P = 0.4 ?
|
|
|
|
*/
|
|
|
|
|
|
male(C):M/P;female(C):F/P:-
|
|
person(C),
|
|
setof(Male,known_male(Male),LM),
|
|
length(LM,M),
|
|
setof(Female,known_female(Female),LF),
|
|
length(LF,F),
|
|
P is F+M.
|
|
|
|
|
|
person(f).
|
|
|
|
known_female(a).
|
|
known_female(b).
|
|
known_female(c).
|
|
|
|
known_male(d).
|
|
known_male(e).
|