forall/2


Description

forall(Generator, Test)

This predicate is true if, for all solutions of Generator, Test is true (some Prolog compilers already define this or a similar predicate).

Template and modes

forall(+callable, +callable)

Errors

Generator is not a callable term:
type_error(callable, Generator)
Test is not a callable term:
type_error(callable, Test)

Examples

| ?- forall(member(X, [1, 2, 3]), write(X)).

Previous | Next | Table of Contents | Bibliography | Glossary

Last updated on: September 6, 2002