PLOGHELP FAIL                                 Chris Mellish, August 1982
                                Revised by Kathryn Seifert  October 1986

A predicate which always fails when called as a goal

    ?- fail.

Keywords: goal, failure


This predicate will always fail when called as a goal.  This does not
sound like useful behaviour, but it can be when you want to force Prolog
to backtrack.  For example, if you had the following database:

    girl(lucy).
    boy(jon).
    girl(ruth).
    boy(bill).
    girl(kathy).

and you wanted to print out the names of all of the girls, you could
write a clause using 'fail':

    all_girls :-
        girl(X),
        print(X), nl,
        fail.

    ?- all_girls.
    lucy
    ruth
    kathy
    no

-- RELATED DOCUMENTATION ----------------------------------------------

PLOGHELP * TRUE
 A predicate which always succeeds when called as a goal
