From jpar@aegean.gr Thu May 31 19:28:20 2001
Received: from eupalinos.samos.aegean.gr (eupalinos.aegean.gr [195.251.160.12])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f4VHSK300457
	for <prolog@swi.psy.uva.nl>; Thu, 31 May 2001 19:28:20 +0200 (MET DST)
Received: by eupalinos.aegean.gr with Internet Mail Service (5.5.2653.19)
	id <LJL1VPHS>; Thu, 31 May 2001 20:27:51 +0300
Message-ID: <81FBBA8C21B9D311A6E500508B6144AA1201AC@eupalinos.aegean.gr>
From: Partsakoulakis Ioannis <jpar@aegean.gr>
To: "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
Date: Thu, 31 May 2001 20:27:46 +0300
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Subject: [SWIPL] another question

I want to ask how can I define a predicate
a(+Term,+ListOfTerms,-ListOfInstances) such that if term Term is unifiable
with a term in ListOfTemrs then ListOfInstances will contain the
correspinding instance of Term. For example if ask

?- a( p(1,X), [p(Y,2),p(2,1),p(1,3)], L ).

I want to take

L = [p(1,2),p(1,3)].

Can somebody help me?

Thanks,

Yannis.

