From aikguitarist@usa.net  Sun Nov 19 23:11:41 2000
Received: from aw163.netaddress.usa.net (aw163.netaddress.usa.net [204.68.24.63])
	by swi.psy.uva.nl (8.9.3/8.9.3) with SMTP id XAA06737
	for <prolog@swi.psy.uva.nl>; Sun, 19 Nov 2000 23:11:40 +0100 (MET)
Received: (qmail 5059 invoked by uid 60001); 19 Nov 2000 22:11:39 -0000
Message-ID: <20001119221139.5058.qmail@aw163.netaddress.usa.net>
Received: from 204.68.24.63 by aw163 for [149.99.21.157] via web-mailer(34FM.0700.4.03) on Sun Nov 19 22:11:39 GMT 2000
Date: 19 Nov 00 17:11:39 EST
From: aikGuitarist <aikguitarist@usa.net>
To: prolog@swi.psy.uva.nl
Subject: numPositive
X-Mailer: USANET web-mailer (34FM.0700.4.03)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by swi.psy.uva.nl id XAA06737

I'm writing a prolog predicate:

% numPos(List, N) succeeds iff List is a list, and there are exactly N 
% positive integers in it at the TOP LEVEl. 

numPos([], 0).
numPos([Head|Tail], N):-integer(Head), Head>0, X is N-1, numPos(Tail,X).
numPos([Head|Tail], N):-numPos(Tail,X).

And it throws a number exception error. ???



____________________________________________________________________
Get free email and a permanent address at http://www.amexmail.com/?A=1

