Question: IN PROLOG write a predicate called intersect(L1,L2). intersect(L1,L2) if there is at least one element that appears in both the lists L1 and L2. For

IN PROLOG write a predicate called intersect(L1,L2). intersect(L1,L2) if there is at least one element that appears in both the lists L1 and L2. For example: intersect([2,4,8,10],[9,8,7,6]) is true. intersect([aster,bluebell,carnation],[daisy,eglantine,fennel]) is false.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!