Subject: [SWIPL] Prolog

From: Nuno Baptista <[email-masked]>
Date: Mon, 18 Dec 2000 11:54:10 GMT

I'm trying to find the algorithm to find if there are equal elements in to given lists. 
I could use some help in this task.
Thanks!!!

Here is the code :

lista([],[],L):-!.
lista([H1|T1],L,R):-
	member(H1,L),
	lista([H1|T1],L,[H1|R]).
lista([H1|T1],[H2|T2],L):-
	lista(T1,T2,L).

Herege doesn't suffer from insanity. He enjoys every minute of it.
                                       
                                   *****HEREGE*****