From nicos@soi.city.ac.uk  Thu Dec 14 16:37:05 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 QAA17173
	for <prolog@swi.psy.uva.nl>; Thu, 14 Dec 2000 16:37:05 +0100 (MET)
Received: from localhost (nicos@localhost)
	by altair.soi.city.ac.uk (8.10.0/8.9.1) with SMTP id eBEFbMX25480
	for <prolog@swi.psy.uva.nl>; Thu, 14 Dec 2000 15:37:22 GMT
Date: Thu, 14 Dec 2000 15:37:22 +0000 (GMT)
From: Nicos Angelopoulos <nicos@soi.city.ac.uk>
To: prolog@swi.psy.uva.nl
Subject: Re: [SWIPL] About Applying a predicate to all the elements of a
 list (fwd)
Message-ID: <Pine.GSO.4.02A.10012141533350.24075-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.


