For example there are two lists
List1 = [ [1,2,3,4], [2,4,5,4],[4,5,2,5],.....]
List2= [ [2,4,4,1], [5,6,1,2], [4,2,3,4],.....]
now i want to look the two list, and compare the third element of each list inside of list 1, that of with list2. If they are same then leave the the list inside of the list1, and continue with next one. if they are not the same put the lists in side of list1 in different list(i.e list3). So something like
compare([][][]).
compare([[firstele, second ele, third ele, fourth ele]|list1],[firstele2, second ele2, third ele2, fourth ele2]|list2],list3):-
....... condition......
how would i do this?