\begin{SPLCode}
map(f, xs) :: (a -> b) -> [a] -> [b] {
- if( isEmpty(xs) ) { return []; }
- else { return f(xs.hd) : map(f, xs.tl); }
+ if( isEmpty(xs) ) { return []; }
+ else { return f(xs.hd) : map(f, xs.tl); }
}
id(x) { return x; }
main() {
- map(id, 1:2:3:[]);
+ map(id, 1:2:3:[]);
}
\end{SPLCode}
\pause
\begin{SPLCode}
plus(x,y) :: Int -> Int -> Int {
- return x + y;
+ return x + y;
}
main() {
- map(plus(1), 1:2:3:[]);
+ map(plus(1), 1:2:3:[]);
}
\end{SPLCode}
\pause
\begin{column}[T]{0.5\textwidth}<1->
\begin{SPLCode}
main() {
- map(\x-> x+1, 1:2:3:[]);
+ map(\x-> x+1, 1:2:3:[]);
}
\end{SPLCode}
\end{column}
\begin{column}[T]{0.5\textwidth}<4->
\begin{SPLCode}
1lambda_23(x) {
- return x+1;
+ return x+1;
}
main() {
- map(1lambda_23, 1:2:3:[]);
+ map(1lambda_23, 1:2:3:[]);
}
\end{SPLCode}
\end{column}
\begin{column}[T]{0.5\linewidth}
\begin{SPLCode}
var a = 'H':'e':'l':'l':'o':' ':
- 'w':'o':'r':'l':'d':'!':[];
+ 'w':'o':'r':'l':'d':'!':[];
\end{SPLCode}
\end{column}
\end{columns}
\end{block}
\end{frame}
+\begin{frame}
+ \frametitle{Questions \& Cool demo's}
+
+\end{frame}
+
\end{document}