+:: T = A Int | B Bool
+
+ifAB :: T a a -> a
+ifAB x ifa ifb = if (x =: (A _)) ifa ifb
+\end{lstClean}
+
+Due to the nature of uniqueness typing, many functions in \gls{CLEAN} are state transition functions with possibly unique states.
+The \emph{let before} construct allows the programmer to specify sequential actions without having to invent unique names for the different versions of the state.
+\Cref{lst:let_before} shows an example of the usage of the \emph{let before} construct (adapted from~\cite[Chp.~3.5.4]{plasmeijer_clean_2021}).
+
+\begin{lstClean}[label={lst:let_before},caption={Let before expression example.}]
+readChars :: *File -> ([Char], *File)
+readChars file
+# (ok, char, file) = freadc file
+| not ok = ([], file)
+# (chars, file) = readChars file
+= ([char:chars], file)
+\end{lstClean}