fail [ISO]

This predicate always fails, it forces failing of the current branch. While failing it will attempt to redo the last goal that was successfully proven, if no redo is possible then the previous goal is considered for a redo, etc. until there are no more goals to redo.

see also: always/2 call/1 catch/2 catch/3 halt/0 halt/1 if-then/2 if-then-else/2 once/1 repeat/0 throw/1 true/0

Examples
stream_property(A, F), fail. No solution will be displayed because after each next solution of stream_property/2 the goal fail is encountered.

 

 

info@trinc-prolog.com