Coroutining deals with having Prolog goals scheduled for execution as
soon as some conditions is fulfilled. In Prolog the most commonly used
conditions is the instantiation (binding) of a variable. Scheduling a
goal to execute immediately after a variable is bound allows may be used
to avoid instantiation errors for some built-in predicates (e.g. arithmetic),
do work lazy, prevent the binding of a variable to a particular
value, etc. Using read/1). Spec
is a file-specification for absolute_file_name/3. Terms
is the resulting list of Prolog terms. Options is a list of
options for
absolute_file_name/3
and open/4. In
addition, the option
tail(Tail) is defined, forming a difference-list.