I am very new to Prolog, and am trying to write a rule that finds a person with more money. I am consulting a file which looks like this:
money('Henry', 200).
money('Sally', 500).
money('Tom', 50).
Here is my attempt at writing a rule that finds the person with more money:
richer(X, Y):- money(X) > money(Y).
Which is not working. I'm kind of lost on how to access that numeric value from the file I'm consulting. Sorry for the simple question, but I have tried Googling it for a while with no success.