[ Advanced Control and Suspensions | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

# delayed_goals(?Var, -GoalList)

Succeeds if GoalList is the list of all goals delayed by the variable Var.

Var
  Any term.
GoalList
  List or variable.

## Description

Unifies GoalList with the list of all goals delayed by the variable Var. This list contains all goals that will be woken if the variable Var will be instantiated. If there are no such goals, e.g. when Var is not a variable, GoalList is unified with nil.

### Modes and Determinism

- delayed_goals(?, -) is det

## Examples

    Success:
        [eclipse]: X > 0, X < 5, delayed_goals(X, L).

        X = _d103
        L = [_d103 > 0, _d103 < 5]

        Delayed goals:
            _d103 > 0
            _d103 < 5
        yes.
        [eclipse]: X > 0, X = 1, delayed_goals(X, L).

        X = 1
        L = []
        yes.
    Fail:
        X > 0, delayed_goals(X, []).

## See Also

delayed_goals / 1, delayed_goals_number / 2, subcall / 2