We need some way to know which arguments should become input ports and
which argument(s?) should become the current state (\eg, be bound to
the register outputs). This does not hold just for the top
We need some way to know which arguments should become input ports and
which argument(s?) should become the current state (\eg, be bound to
the register outputs). This does not hold just for the top
the type checker to always type-check both alternatives, which cannot be
done. The type-checker is unable to distinguish the two case
alternatives (this is partly possible using \small{GADT}s, but that
the type checker to always type-check both alternatives, which cannot be
done. The type-checker is unable to distinguish the two case
alternatives (this is partly possible using \small{GADT}s, but that
This is a fundamental problem, that would seem perfectly suited for a
type class. Considering that we need to switch between to
This is a fundamental problem, that would seem perfectly suited for a
type class. Considering that we need to switch between to
\subsection{General recursion}
Of course there are other forms of recursion, that do not depend on the
length (and thus type) of a list. For example, simple recursion using a
\subsection{General recursion}
Of course there are other forms of recursion, that do not depend on the
length (and thus type) of a list. For example, simple recursion using a