object

# `coroutining`

Coroutining predicates.

Author: Paulo Moura
Version: 0.1
Date: 2019/1/5
Compilation flags:
`static, context_switching_calls`

(no dependencies on other entities)

## Public interface

### `dif/2`

Sets a constraint that is true iff the two terms are different.

Compilation flags:
`static`
Template:
`dif(Term1,Term2)`
Mode and number of proofs:
`dif(+term,+term)` - `zero_or_one`

### `freeze/2`

Delays the execution of a goal until a variable is bound.

Compilation flags:
`static`
Template:
`freeze(Variable,Goal)`
Meta-predicate template:
`freeze(*,0)`
Mode and number of proofs:
`freeze(+term,+callable)` - `zero_or_more`

### `frozen/2`

Unifies Goal with the goal delayed by Variable. When no goals are frozen on Variable, Goal is unified with true.

Compilation flags:
`static`
Template:
`frozen(Variable,Goal)`
Mode and number of proofs:
`frozen(@var,--callable)` - `one`

### `when/2`

Calls Goal when Condition becomes true. The portable conditions are: nonvar/1, ground/1, (,)/2, and (;)/2.

Compilation flags:
`static`
Template:
`when(Condition,Goal)`
Meta-predicate template:
`when(*,0)`
Mode and number of proofs:
`when(+callable,+callable)` - `zero_or_more`

## Protected interface

(none)

## Private predicates

(none)

## Operators

(none)

## Remarks

- Supported backend Prolog systems: ECLiPSe, SICStus Prolog, SWI-Prolog, and YAP.