From nicos@soi.city.ac.uk  Thu Dec 14 15:48:32 2000
Received: from altair.soi.city.ac.uk (altair.soi.city.ac.uk [138.40.91.7])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id PAA12644;
	Thu, 14 Dec 2000 15:48:32 +0100 (MET)
Received: from localhost (nicos@localhost)
	by altair.soi.city.ac.uk (8.10.0/8.9.1) with SMTP id eBEEmss23272;
	Thu, 14 Dec 2000 14:48:54 GMT
Date: Thu, 14 Dec 2000 14:48:54 +0000 (GMT)
From: Nicos Angelopoulos <nicos@soi.city.ac.uk>
X-Sender: nicos@altair.soi.city.ac.uk
To: Jan Wielemaker <jan@swi.psy.uva.nl>
cc: prolog@swi.psy.uva.nl
Subject: Re: [SWIPL] About Applying a predicate to all the elements of a
 list
In-Reply-To: <200012141415.PAA14549@gollem.swi.psy.uva.nl>
Message-ID: <Pine.GSO.4.02A.10012141423200.15130-100000@altair.soi.city.ac.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII




On Thu, 14 Dec 2000, Jan Wielemaker wrote:

> For those interested, using maplist doesn't make your programs faster.
> If you are in a hurry, simply write the loop yourself.  The trouble
> is call/3, performing a rather expensive meta-call.
> 
> 	--- Jan
> 

	alternatively one might use syntactic transformations
	during compile time and factor out the meta call,
	(term_expansion/2) 

	the transformation is straight forward since 
	it doesnt depend on any other information,

	the drawback of course is that you get
	extra clauses in your database and that these
	clauses are dynamic (due to use of assert)

nicos.

