Add some slides to my part.
authorMatthijs Kooijman <matthijs@stdin.nl>
Sun, 13 Dec 2009 13:55:24 +0000 (14:55 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Sun, 13 Dec 2009 13:55:51 +0000 (14:55 +0100)
figures/Pythagoras.png [new file with mode: 0644]
matthijs/introduction.lhs

diff --git a/figures/Pythagoras.png b/figures/Pythagoras.png
new file mode 100644 (file)
index 0000000..0ca936d
Binary files /dev/null and b/figures/Pythagoras.png differ
index b8f01b9c03503351b928db757481afaeb777066a..22f0f0a650a0223f5d6a583c4e848635b2c99d7a 100644 (file)
@@ -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: