The problem with \texttt{case} statements is that they are very
verbose, which is greatly distracting for smaller cases, and~can
take away from the actual intent of the~code. Map~sets make simple
cases simple by allowing concise map definitions.
If \ref{_map-set_/@name@} is provided, then each map implicitly
operates on that reference as its input, unless overridden using
\ref{_map_/@name@}. \ref{_map-set_/@default@} can be used to
provide a constant default if no mapping is otherwise available; see
also~\ref{_map-else_}.
Mappings are defined using \ref{_map_}. The input defaults to
the~reference declared by~\ref{_map-set_/@name@},
if~provided. \ref{_map_/@name@} takes precedence, even if
the~former is provided. Just like \texttt{case}~statements,
multiple inputs can be provided by specifying multiple references;
this means that each \ref{_map_/@name@} can differ.\footnote{This
isn't particularly intuitive or recommended, but it does simplify
certain tasks enough to maybe justify this type of use.}
Just like \texttt{case}~statements themselves, maps are
surjective---the codomain implicitly includes $0$~to handle all
default cases, unless a default is provided.
float
Destination mapping
The default condition can be handled in two different ways: via
\ref{_map-set_/@default@}, or using \ref{_map-else_}; the latter
provides more flexibility and generally reads better. Both cannot
be used together.
Destination mapping
A default value was already provided by _map-set_/@default@