The term ``fold'' is also referred to as ``reduce''---%
they are synonymous.
Unless otherwise specified,
folding occurs left-to-right.
\emph{Unfolding} is the opposite of a reduction---%
it \emph{generates} values from existing values.
\ref{_fold-matrix_} folds a matrix into a vector by summing each of
the~rows.
\ref{_unfold-vector-grouped_} generates a matrix from a vector---%
that is, it generates vectors within a vector---%
by grouping values.
The \tt{@class@} is used both as a predicate and as a determination of
the resulting vector's length
(the~number of rows in the resulting matrix).
If non-matching,
no columns will be produced for that respective row.
\tt{@src@} is the vector to be unfolded,
containing the raw values to be grouped.
\tt{@grouping@} \should be the same length as~\ref{@src@} and determines
the group~(row) in which the respective value should appear.
\ref{@generates@} names the resulting matrix and~\ref{@desc@} provides
its description.
Unfolded vector
grouped by