From zimmermann@h-u-zimmermann.de Tue Aug 21 11:25:07 2001
Received: from moutvdom01.kundenserver.de (moutvdom01.kundenserver.de [195.20.224.200])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f7L9P7b20102
	for <prolog@swi.psy.uva.nl>; Tue, 21 Aug 2001 11:25:07 +0200 (MET DST)
Received: from [195.20.224.220] (helo=mrvdom04.kundenserver.de)
	by moutvdom01.kundenserver.de with esmtp (Exim 2.12 #2)
	id 15Z7mV-0003VM-00
	for prolog@swi.psy.uva.nl; Tue, 21 Aug 2001 11:25:07 +0200
Received: from pd951e750.dip.t-dialin.net ([217.81.231.80] helo=rechnerneu)
	by mrvdom04.kundenserver.de with smtp (Exim 2.12 #2)
	id 15Z7mU-0000Ho-00
	for prolog@swi.psy.uva.nl; Tue, 21 Aug 2001 11:25:06 +0200
Date: Tue, 21 Aug 2001 11:25:33 +0200
To: prolog@swi.psy.uva.nl
From: Hans-Ulrich Zimmermann <zimmermann@h-u-zimmermann.de>
X-Mailer: Opera 5.11 build 904
X-Priority: 3 (Normal)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Message-Id: <E15Z7mU-0000Ho-00@mrvdom04.kundenserver.de>
Subject: [SWIPL] sumlist to arithmetic function

Hi,
converting the old sumlist predicate to an arithmetic function
will not work:

:-arithmetic_function(sumlist/1).

sumlist([],0).
sumlist([Kopf|Rumpf], Summe) :- sumlist(Rumpf,Teilsumme), 
                                Summe is Kopf + Teilsumme.

Is there any solution?

H.-Ulrich
------------------------------------
mailto:zimmermann@h-u-zimmermann.de 
http://www.h-u-zimmermann.de


