From e480d2e14eed8663971997252ff935bcb419be3b Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 1 Jun 2016 19:57:11 +0200 Subject: [PATCH] betere code --- deliverables/p4/p4.tex | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/deliverables/p4/p4.tex b/deliverables/p4/p4.tex index ed5632c..692fb06 100644 --- a/deliverables/p4/p4.tex +++ b/deliverables/p4/p4.tex @@ -32,13 +32,13 @@ \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 @@ -56,11 +56,11 @@ main() { \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 @@ -100,17 +100,17 @@ main() { \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} @@ -162,7 +162,7 @@ var a = "Hello world!"; \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} @@ -216,5 +216,10 @@ print(x); \end{block} \end{frame} +\begin{frame} + \frametitle{Questions \& Cool demo's} + +\end{frame} + \end{document} -- 2.20.1