im a beginner on prolog, and I am trying to return a list of results.
Say i have items belonging to a person ie.
items(person1,apple).
items(person1,orange).
I want to be able to create a function that can return the list of items belonging to that person. At the moment I have:
getitems(Person,Result):-items(Person,N),Result is N.
This only returns the first item. How can i get it to return a list of all the items that belong to the person?
Thanks.