\subsection{Paper organisation} \label{sec:intro:org} In this paper we present different advantages of working with imperative code in a functional style. We do this by means of a case study, an interpreter of the language While~\citep{proganal}. This example language is briefly described in \autoref{sec:intro:while}. Before discussing our interpreter, we discuss basic definitions that will be helpful in \autoref{sec:predefs}. Since extensive research has already been done into lexing and parsing \citep[see e.g.][]{monads,yard}, we skip these steps and assume we already have an abstract syntax tree (AST). This AST is described in \autoref{sec:ast}. In \autoref{sec:eval} we discuss different possibilities of evaluating mathematical expressions. Finally, in \autoref{sec:interp} we propose a While interpreter. We finish by articulating the advantages of functional interpretation in \autoref{sec:concl}. \autoref{sec:ftypes} lists the functions and types that the reader is supposed to know. Affinity with monads is required.