Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Jean-Luc-Picard-2021 opened this issue Aug 28, 2022 · 0 comments

Comments

@Jean-Luc-Picard-2021
Copy link

Jean-Luc-Picard-2021 commented Aug 28, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants