(no subject)

From: chegivara <chegivara_at_pobox.sk>
Date: Mon 14 Mar 2005 03:37:25 AM GMT
Message-Id: <200503140337.j2E3bPrl017227@www6.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 :)
Received on Mon Mar 14 03:41:53 2005

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