\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: