Note: this module is deprecated, because automatic delays are
ill-defined, and not very useful in practice anyway. Experience with
the library suggests that instantaneous loops are relatively easy to
avoid.

This version differs from the parametric one in introducing automatic
delays. In practice, if a dependency loop involves a transfer
primitive, it will be resolved during runtime even if transfer
functions are not delayed by default. Also, the until construct and
multi-signal transfer variants are missing from this module.

The interface of this module differs from the old Elerea in the
following ways:

the delta time argument is generalised to an arbitrary type, so it
is possible to do without external altogether in case someone
wants to do so;

there is no sampler any more, it is substituted by join, as
signals are monads;

generator has been conceptually simplified, so it's a more basic
primitive now;

all signals are aged regardless of whether they are sampled
(i.e. their behaviour doesn't depend on the context any more);

the user needs to cache the results of applicative operations to be
reused in multiple places explicitly using the memo combinator.

Embedding a signal into an IO environment. Repeated calls to
the computation returned cause the whole network to be updated, and
the current sample of the top-level signal is produced as a result.
The computation accepts a global parameter that will be distributed
to all signals. For instance, this can be the time step, if we
want to model continuous-time signals.

A signal that can be directly fed through the sink function
returned. This can be used to attach the network to the outer
world. Note that this is optional, as all the input of the network
can be fed in through the global parameter, although that is not
really convenient for many signals.

An event-like signal that can be fed through the sink function
returned. The signal carries a list of values fed in since the
last sampling, i.e. it is constantly [] if the sink is never
invoked. The order of elements is reversed, so the last value
passed to the sink is the head of the list. Note that unlike
external this function only returns a generator to be used within
the expression constructing the top-level stream, and this
generator can only be used once.

A stateful transfer function. The current input affects the
current output, i.e. the initial state given in the first argument
is considered to appear before the first output, and can never be
observed. Every output is derived from the current value of the
input signal, the global parameter and the previous output. The
only exception is when a transfer function sits in a loop without a
delay. In this case, a delay will be inserted at a single place
during runtime (i.e. the previous output of the node affected will
be reused) to resolve the circular dependency.