From: Matthijs Kooijman Date: Sun, 13 Dec 2009 13:55:24 +0000 (+0100) Subject: Add some slides to my part. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Ffinal-presentation.git;a=commitdiff_plain;h=d5879f3e5bfdd900b06cbb9f6e08bf34fbe2631e Add some slides to my part. --- diff --git a/figures/Pythagoras.png b/figures/Pythagoras.png new file mode 100644 index 0000000..0ca936d Binary files /dev/null and b/figures/Pythagoras.png differ diff --git a/matthijs/introduction.lhs b/matthijs/introduction.lhs index b8f01b9..22f0f0a 100644 --- a/matthijs/introduction.lhs +++ b/matthijs/introduction.lhs @@ -3,4 +3,75 @@ \author{Matthijs Kooijman} \date{December 14, 2009} -\frame{\titlepage \setcounter{framenumber}{1}} \ No newline at end of file +\frame{\titlepage \setcounter{framenumber}{1}} + + +\frame +{ + \begin{block}{Applying the $sqrt$ function to 4} + $ sqrt(4) = 2$ + \end{block} +} + +\note[itemize] +{ + \item Functional language - Math like + \item Central: Functions + \item Outside: + \begin{itemize} + \item Put arguments in (application) + \item get result out + \end{itemize} + \item Inside: + \begin{itemize} + \item \emph{How} does the function work? (definition) + \end{itemize} + + \item Next sheet: sqrt example +} + +\frame +{ + \begin{block}{A mathematical square function} + $ f(x) = x * x$ + \end{block} + + \pause + \begin{block}{A square function in Haskell} + \texttt{square x = x * x} + \end{block} +} + +\note[itemize] +{ + \item Next sheet: f(x) = x*x example + \item Next sheet: square in Haskell + \item No braces + \item Next sheet: pyth in Haskell + \item Functions can be used by other functions +} + +\frame +{ + \begin{columns} + \begin{column}{8cm} + \begin{block}{Pythagoras' theorem} + $ a^2 + b^2 = c^2 $ + + or + + $ c = \sqrt{a^2 + b^2} $ + \end{block} + \end{column} + \begin{column}{3cm} + \includegraphics[width=3cm]{figures/Pythagoras} + \end{column} + \end{columns} + \pause + % TODO: Alignment is weird due to mixing columns and non-columns + \begin{block}{Calculating $c$ in Haskell} + \texttt{pyth a b = sqrt ((square a) + (square b))} + \end{block} +} + +% vim: set filetype=tex sw=2 sts=2 expandtab: