improved presentation
authorpimjager <pim@pimjager.nl>
Thu, 2 Jun 2016 09:27:26 +0000 (11:27 +0200)
committerpimjager <pim@pimjager.nl>
Thu, 2 Jun 2016 09:27:26 +0000 (11:27 +0200)
deliverables/p4/p4.tex

index 692fb06..b748f04 100644 (file)
 \begin{document}
 \frame{\titlepage}
 
+\begin{frame}[fragile]
+       \frametitle{Today}
+       \begin{itemize}
+               \item Higher order functions
+               \item Anonymous lambda functions
+               \item Syntactic sugar
+               \item Future work 
+               \item Demo
+       \end{itemize}
+\end{frame}
+
 \begin{frame}[fragile]
        \frametitle{Higher order functions implemented using function pointers}
 
@@ -52,7 +63,7 @@ main() {
 \end{frame}
 
 \begin{frame}[fragile]
-       \frametitle{Functions application can be curried}
+       \frametitle{Function application can be curried}
 
        \begin{SPLCode}
 plus(x,y) :: Int -> Int -> Int {
@@ -60,7 +71,7 @@ plus(x,y) :: Int -> Int -> Int {
 }
 
 main() {
-    map(plus(1), 1:2:3:[]);
+    map(plus(4), 1:2:3:[]);
 }
        \end{SPLCode}
        \pause
@@ -130,14 +141,14 @@ main() {
                                \item We want to protect our users from global state (as much 
                                        as possible).
                        \end{itemize}
-                       \item Global constants allowed through \texttt{Let} statements
-                       \item \texttt{<LetDecl> ::= `Let' <type> <id> `=' <Expr> `;'}
+                       \item Global constants allowed through \texttt{let} statements
+                       \item \texttt{<LetDecl> ::= `let' <type> <id> `=' <Expr> `;'}
                        \item Lets are rewritten to constant functions
                \end{itemize}
                \begin{columns}[T]
                        \begin{column}[T]{0.4\linewidth}
                                \begin{SPLCode}
-Let Int x = 5;
+let Int x = 5;
                                \end{SPLCode}
                        \end{column}
                        \begin{column}[T]{0.4\linewidth}
@@ -185,13 +196,14 @@ var xs = 1:2:3:[];
                \begin{columns}[T]
                        \begin{column}[T]{0.34\linewidth}
                                \begin{SPLCode}
-print("x is: ", x);
+print("x is: ", x, "\n");
                                \end{SPLCode}
                        \end{column}
                        \begin{column}[T]{0.5\linewidth}
                                \begin{SPLCode}
 print("x is: ");
 print(x);
+print("\n");
                                \end{SPLCode}
                        \end{column}
                \end{columns}