I have the following prolog code:
predicates
like(string)
clauses
like(apple).
like(girl).
q :- like(A),write(A).
goal q.
How to get two solutions?
I have the following prolog code:
predicates
like(string)
clauses
like(apple).
like(girl).
q :- like(A),write(A).
goal q.
How to get two solutions?
using findall predicate http://cs.union.edu/~striegnk/learn-prolog-now/html/node96.html
or using fail