repositories
/
cc1516.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d676a1
)
improved presentation
author
pimjager
<pim@pimjager.nl>
Thu, 2 Jun 2016 09:27:26 +0000
(11:27 +0200)
committer
pimjager
<pim@pimjager.nl>
Thu, 2 Jun 2016 09:27:26 +0000
(11:27 +0200)
deliverables/p4/p4.tex
patch
|
blob
|
history
diff --git
a/deliverables/p4/p4.tex
b/deliverables/p4/p4.tex
index
692fb06
..
b748f04
100644
(file)
--- a/
deliverables/p4/p4.tex
+++ b/
deliverables/p4/p4.tex
@@
-27,6
+27,17
@@
\begin{document}
\frame{\titlepage}
\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}
\begin{frame}[fragile]
\frametitle{Higher order functions implemented using function pointers}
@@
-52,7
+63,7
@@
main() {
\end{frame}
\begin{frame}[fragile]
\end{frame}
\begin{frame}[fragile]
- \frametitle{Function
s
application can be curried}
+ \frametitle{Function application can be curried}
\begin{SPLCode}
plus(x,y) :: Int -> Int -> Int {
\begin{SPLCode}
plus(x,y) :: Int -> Int -> Int {
@@
-60,7
+71,7
@@
plus(x,y) :: Int -> Int -> Int {
}
main() {
}
main() {
- map(plus(
1
), 1:2:3:[]);
+ map(plus(
4
), 1:2:3:[]);
}
\end{SPLCode}
\pause
}
\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 We want to protect our users from global state (as much
as possible).
\end{itemize}
- \item Global constants allowed through \texttt{
L
et} statements
- \item \texttt{<LetDecl> ::= `
L
et' <type> <id> `=' <Expr> `;'}
+ \item Global constants allowed through \texttt{
l
et} statements
+ \item \texttt{<LetDecl> ::= `
l
et' <type> <id> `=' <Expr> `;'}
\item Lets are rewritten to constant functions
\end{itemize}
\begin{columns}[T]
\begin{column}[T]{0.4\linewidth}
\begin{SPLCode}
\item Lets are rewritten to constant functions
\end{itemize}
\begin{columns}[T]
\begin{column}[T]{0.4\linewidth}
\begin{SPLCode}
-
L
et Int x = 5;
+
l
et Int x = 5;
\end{SPLCode}
\end{column}
\begin{column}[T]{0.4\linewidth}
\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}
\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);
\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}
\end{SPLCode}
\end{column}
\end{columns}