[eclipse-clp-users] two simple queries

From: Kostas Oikonomou <ko_at_research.att.com>
Date: Wed, 14 Sep 2011 16:32:49 -0400
Can someone explain why the query

   make2([r(6,[e8,e10,e19]), r(5,[e18,e15])]).

behaves as expected, whereas the query

   make3([r(6,[e8,e10,e19]), r(5,[e18,e15])]).

doesn't?  The param() in make3 is not necessary, but seems 
to cause a problem.


make2(Rs) :-
         (foreach(r(I,Path), Rs) do
              write(I), write(' '), writeln(Path)
         ).

make3(Rs) :-
         (foreach(r(I,Path), Rs), param(I,Path) do
             write(I), write(' '), writeln(Path)
         ).

Thanks.

			Kostas
Received on Wed Sep 14 2011 - 20:32:55 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET