built-in method
ignore/1
ï
Descriptionï
ignore(Goal)
This predicate succeeds whether its argument succeeds or fails and it is not re-executable. This built-in meta-predicate is declared as a private method and thus cannot be used as a message to an object.
This meta-predicate is opaque to cuts in its argument.
Meta-predicate templateï
ignore(0)
Modes and number of proofsï
ignore(+callable) - one
Errorsï
Goal
is a variable:instantiation_error
Goal
is neither a variable nor a callable term:type_error(callable, Goal)
Examplesï
Call a goal and succeeding even if it fails:
ignore(Goal)
To send a message succeeding even if it fails to self:
ignore(::Goal)
To send a message succeeding even if it fails to an explicit object:
ignore(Object::Goal)