Creating lists do not include duplicates in Prolog?

When you do pattern matching on a list of Xs it always puts in the same value of milan so there are a lot of duplication. You can avoid it by first ensuring no duplication in the list of Xs and finding corresponding players.

When you do pattern matching on a list of Xs, it always puts in the same value of milan so there are a lot of duplication. You can avoid it by first ensuring no duplication in the list of Xs and finding corresponding players: subset(, ). Subset(Xs, _|Ys) :- subset(Xs, Ys).

Subset(X|Xs, X|Ys) :- subset(Xs, Ys). Allteams(Ts) :- findall(T, player(T, _), Ts). Teams(T) :- allteams(Ts), subset(T, Ts).

Find1(T, L) :- player(T, L). Find1(T|Ts, L) :- player(T, L0), find1(Ts, L1), intersection(L0, L1, L). Find(X, Y) :- teams(X), find1(X, Y).

Here I find a set of all teams first and try to find subsets satisfying the condition.

Thanks a lot pad... – Palindrom May 11 at 14:35.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send