I am a bit stuck on this question - Write a rule where given two people A and B and a date D returns the list of all dates of when A and B have exchanged messages until date D.
I have this so far but I don't know where I am going wrong.
mexchanged(A,B,D) :- message(A,B,D1), D > D1.
And secondly, I am completely stuck on this - Write a rule that counts the number of messages sent for each person in a database of facts.
How do I write these rules?
edit: sorry I forgot to post these before;, these are few of the facts.
message(ben, tom, '20-03-2011').
message(kim, james, '17-11-2011').
message(ben, kim, '06-12-2011').
message(harry, jacky, '29-09-2011').
message(barry, chin, '06-01-2011').
Gcoming from however? What facts are currently defined? - Hunter McMillenfindall? - Will Ness