Subject: numPositive

From: aikGuitarist <[email-masked]>
Date: 19 Nov 00 17:11:39 EST

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