ciao icon indicating copy to clipboard operation
ciao copied to clipboard

Clarification request: does Ciao Prolog have a foreach/2 somewhere?

Open Jean-Luc-Picard-2021 opened this issue 2 years ago • 0 comments

I tried first in Ciao Prolog playground:

?- foreach(member(X,[1,2,3]), write(X)), nl.
{ERROR: No handle found for thrown exception error(existence_error(procedure,'user:foreach'/2),'user:foreach'/2)} 

On the other hand SWI-Prolog gives me:

?- foreach(member(X,[1,2,3]), write(X)), nl.
123
true.

Its not the optimal test case for foreach/2 since the main application of foreach/2 is rather a goal in the second argument that produces constraints.

I also checked the Ciao Prolog documentation search function, but it didn't show me literally the name foreach of some predicate.

Maybe its burried somewhere by another name?

Jean-Luc-Picard-2021 avatar Aug 28 '22 22:08 Jean-Luc-Picard-2021

Come on the ticket is more than 2 years old, and you couldn't answer the question in the ticket?

But you have time to reopen it? Whats wrong with Ciao people?

Jean-Luc-Picard-2021 avatar May 04 '24 03:05 Jean-Luc-Picard-2021