From i960242@dei.isep.ipp.pt  Mon Dec 18 12:53:24 2000
Received: from groucho.dei.isep.ipp.pt (root@groucho.dei.isep.ipp.pt [193.136.62.4])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id MAA25255
	for <prolog@swi.psy.uva.nl>; Mon, 18 Dec 2000 12:53:18 +0100 (MET)
Received: from pci2a7 (pci2a7.dei.isep.ipp.pt [193.136.62.36])
	by groucho.dei.isep.ipp.pt (8.9.1a/DEINET-1.1) with SMTP id LAA16353
	for <prolog@swi.psy.uva.nl>; Mon, 18 Dec 2000 11:53:40 GMT
Message-Id: <SAK.2000.12.18.jkntmalh@pci2a7>
Date: Mon, 18 Dec 2000 11:54:10 GMT
X-Priority: 3
From: Nuno Baptista <i960242@dei.isep.ipp.pt>
X-Mailer: Mail Warrior
To: prolog@swi.psy.uva.nl
MIME-Version: 1.0
Content-Type: Text/Plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8Bit
X-Mailer-Version: v3.57
Subject: [SWIPL] Prolog

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*****


