
Prologic Island is a game show in which a prolog term looks for a term to unify with on a subtropical island. Write a prolog predicate that returns a list of potential matches given the contestant and the bachelor terms on the island.
The predicate temptation(Island, Contestant, PotentialMatches) has three arguments:
Island: A list of bachelor termsContestant: The contestantPotentialMatches A list of elements of the first argument that may unify with the contestant, in the same order?- temptation(
|     [
|         complex(Something1, panda, wwf),
|         simple(Something2, cuts, pandas),
|         simple(Something3, cuts, Something3),
|         complex(simple, easy)
|     ],
|     simple(determinism, cuts, Other),
|     R).
R = [simple(Something2, cuts, pandas), simple(Something3, cuts, Something3)].
Do not use special unification and comparison predicates such as unifiable/3.