(no subject)

From: chegivara <chegivara_at_pobox.sk>
Date: Mon 14 Mar 2005 03:41:02 AM GMT
Message-Id: <200503140341.j2E3f2cw022740@www7.pobox.sk>
Hi people,
could you help me ? i need do something like this :

sumList([3..7,5,8..9,0],K)
-->
K = 16..21

is my solution right ???

:- lib(fd).

sumList([],Sum) :-
	Sum ::[0].
sumList([H|Rest],Sum) :-
	sumList(Rest,Sum1),
	A :: H,
	Sum #= A+Sum1.

eclipse 5.6 win
sometimes happens (instantiation fault in A :: _397{[0 .. 24]})

thank you very much :)
____________________________________
Vsetko o SuperStar
http://superstar.atlas.sk

Received on Mon Mar 14 03:41:54 2005

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:34 PM GMT GMT