This commit is contained in:
NikolajDanger
2022-05-02 12:42:49 +02:00
parent 95c254d573
commit 383332077b
9 changed files with 124 additions and 88 deletions

View File

@ -13,7 +13,13 @@
\setlength{\parskip}{5pt}
\setlength{\parindent}{0pt}
\title{W1 - IPS}
\author{Nikolaj Gade (qhp695)}
\date{May 2022}
\begin{document}
\maketitle
\section{}
\begin{enumerate}
\item I am a DIKU Computer Science BSc, general profile
@ -55,6 +61,7 @@ The \texttt{OVER} expressions contain a loop, meaning they run in linear time by
\subsection{Code Sharing/Elegance}
The code is made readable and with mininal code duplication. The \texttt{OPERATE} and \texttt{OVER} expressions have code run before the specific expression is determined, which reduced duplication.
\newpage
\subsection*{The full \texttt{eval} code}
\begin{lstlisting}[language=FSharp]
@ -109,6 +116,7 @@ let dif = map(fn int (int x) => if x == 0 then arr[x] else arr[x] - arr[x-1], io
The \texttt{dif} array is constructed using an anonymous function in a \texttt{map} function call.
\newpage
\subsection*{The full Fasto code}
\begin{lstlisting}[language=Fasto]
fun int mul(int x, int y) =