From e9374aed1f2b165905b49c77efb7dd3aa3087e74 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 20 Apr 2015 18:06:58 +0200 Subject: [PATCH] VL2: Restructure files, make the latex code more modular Also added a few more section to make beamer and article more compatible. --- VL2/VL2.tex | 294 +----------------- VL2/VL2_document_structure.tex | 127 ++++++++ VL2/VL2_handout.tex | 134 +------- ...tions5.tex => VL2_anonymous_functions.tex} | 0 ...{VL2_rec_patterns6.tex => VL2_filter1.tex} | 0 ...{VL2_rec_patterns7.tex => VL2_filter2.tex} | 0 .../{VL2_rec_patterns8.tex => VL2_fold1.tex} | 0 .../{VL2_rec_patterns9.tex => VL2_fold2.tex} | 0 .../{VL2_rec_patterns10.tex => VL2_fold3.tex} | 0 .../{VL2_rec_patterns11.tex => VL2_fold4.tex} | 0 .../{VL2_rec_patterns12.tex => VL2_fold5.tex} | 0 ...{VL2_define_functions3.tex => VL2_let.tex} | 0 ...ne_functions4.tex => VL2_let_vs_where.tex} | 0 .../{VL2_rec_patterns2.tex => VL2_map1.tex} | 0 .../{VL2_rec_patterns3.tex => VL2_map2.tex} | 0 .../{VL2_rec_patterns4.tex => VL2_map3.tex} | 0 .../{VL2_rec_patterns5.tex => VL2_map4.tex} | 0 ... => VL2_more_ways_to_define_functions.tex} | 0 ...lection2.tex => VL2_questions_for_you.tex} | 0 ...rec_patterns1.tex => VL2_rec_patterns.tex} | 0 ...tion1.tex => VL2_what_you_should_know.tex} | 0 ...L2_define_functions2.tex => VL2_where.tex} | 0 22 files changed, 133 insertions(+), 422 deletions(-) create mode 100644 VL2/VL2_document_structure.tex rename VL2/content/{VL2_define_functions5.tex => VL2_anonymous_functions.tex} (100%) rename VL2/content/{VL2_rec_patterns6.tex => VL2_filter1.tex} (100%) rename VL2/content/{VL2_rec_patterns7.tex => VL2_filter2.tex} (100%) rename VL2/content/{VL2_rec_patterns8.tex => VL2_fold1.tex} (100%) rename VL2/content/{VL2_rec_patterns9.tex => VL2_fold2.tex} (100%) rename VL2/content/{VL2_rec_patterns10.tex => VL2_fold3.tex} (100%) rename VL2/content/{VL2_rec_patterns11.tex => VL2_fold4.tex} (100%) rename VL2/content/{VL2_rec_patterns12.tex => VL2_fold5.tex} (100%) rename VL2/content/{VL2_define_functions3.tex => VL2_let.tex} (100%) rename VL2/content/{VL2_define_functions4.tex => VL2_let_vs_where.tex} (100%) rename VL2/content/{VL2_rec_patterns2.tex => VL2_map1.tex} (100%) rename VL2/content/{VL2_rec_patterns3.tex => VL2_map2.tex} (100%) rename VL2/content/{VL2_rec_patterns4.tex => VL2_map3.tex} (100%) rename VL2/content/{VL2_rec_patterns5.tex => VL2_map4.tex} (100%) rename VL2/content/{VL2_define_functions1.tex => VL2_more_ways_to_define_functions.tex} (100%) rename VL2/content/{VL2_reflection2.tex => VL2_questions_for_you.tex} (100%) rename VL2/content/{VL2_rec_patterns1.tex => VL2_rec_patterns.tex} (100%) rename VL2/content/{VL2_reflection1.tex => VL2_what_you_should_know.tex} (100%) rename VL2/content/{VL2_define_functions2.tex => VL2_where.tex} (100%) diff --git a/VL2/VL2.tex b/VL2/VL2.tex index e1979d1..73c325a 100644 --- a/VL2/VL2.tex +++ b/VL2/VL2.tex @@ -1,307 +1,21 @@ -\documentclass[10pt,a5paper,mathserif,serif,usenames,dvipsnames]{beamer} +\documentclass[10pt,a5paper,mathserif,serif,usenames,dvipsnames,handout]{beamer} -% packages -\usepackage{xcolor} -\usepackage[utf8]{inputenc} -\usepackage{amsmath} -\usepackage{amsfonts} -\usepackage{amssymb} -\usepackage{graphicx} -\usepackage{listings} -\usepackage{minted} - -% for \verb inside \item -\usepackage[T1]{fontenc} -\usepackage[Q=yes]{examplep} - -% package configuration -\DeclareGraphicsExtensions{.pdf,.png,.jpg} -\beamertemplatenavigationsymbolsempty -\setbeamertemplate{footline}[frame number] -\usemintedstyle{friendly} -\newminted{haskell}{frame=single,numbers=left} -\newminted{cpp}{frame=single,numbers=left} -\newminted{c}{frame=single,numbers=left} -\renewcommand{\theFancyVerbLine}{\ttfamily - \textcolor[rgb]{0.0,0.0,0.0}{\footnotesize - \oldstylenums{\arabic{FancyVerbLine}}}} +\input{../common/beamer_configuration.tex} % title page information \author{Julian Ospald} \institute{FH Bielefeld} \title{Haskell: higher order functions} -% color definition -\definecolor{solarized}{HTML}{002B36} -\definecolor{mygreen}{rgb}{0,0.6,0} - -% macros and environments -\newcommand{\code}[1]{\texttt{#1}} -\newcommand{\slidep}{\onslide<+->} -\newenvironment{itemizep} - {\begin{itemize}[<+->]} - {\end{itemize}} - \begin{document} \frame{\titlepage} \begin{frame} \frametitle{Table of Contents} -\tableofcontents +\tableofcontents[hidesubsections=true] \end{frame} -\section{1. Reiteration} - -\begin{frame} -\frametitle{1. Reiteration} -\tableofcontents[currentsection,hideothersubsections] -\end{frame} - -\begin{frame} -\frametitle{1. Reiteration (cnt.)} -\input{./content/VL2_reiteration.tex} -\end{frame} - -\section{2. Polymorphism} - -\begin{frame} -\frametitle{2. Polymorphism} -\tableofcontents[currentsection,hideothersubsections] -\end{frame} - -\begin{frame}[fragile] -\frametitle{2. Polymorphism (cnt.)} -\input{./content/VL2_polymorphism1.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{2. Polymorphism (cnt.)} -\input{./content/VL2_polymorphism2.tex} -\end{frame} - -\section{3. More ways to define functions} - -\begin{frame} -\frametitle{3. More ways to define functions} -\tableofcontents[currentsection,hideothersubsections] -\end{frame} - -\begin{frame}[fragile] -\frametitle{3. More ways to define functions (cnt.)} -\input{./content/VL2_define_functions1.tex} -\end{frame} - -\subsection{3.1. Where} - -\begin{frame}[fragile] -\frametitle{3.1. Where} -\input{./content/VL2_define_functions2.tex} -\end{frame} - -\subsection{3.2. Let} - -\begin{frame}[fragile] -\frametitle{3.2. Let} -\input{./content/VL2_define_functions3.tex} -\end{frame} - -\subsection{3.3. Let vs Where} - -\begin{frame}[fragile] -\frametitle{3.3. Let vs Where} -\input{./content/VL2_define_functions4.tex} -\end{frame} - -\subsection{3.4. Anonymous functions} - -\begin{frame}[fragile] -\frametitle{3.4. Anonymous functions} -\input{./content/VL2_define_functions5.tex} -\end{frame} - -\section{4. Currying} - -\begin{frame} -\frametitle{4. Currying} -\tableofcontents[currentsection,hideothersubsections] -\end{frame} - -\begin{frame}[fragile] -\frametitle{4. Currying (cnt.)} -\input{./content/VL2_currying1.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{4. Currying (cnt.)} -\input{./content/VL2_currying2.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{4. Currying (cnt.)} -\input{./content/VL2_currying3.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{4. Currying (cnt.)} -\input{./content/VL2_currying4.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{4. Currying (cnt.)} -\input{./content/VL2_currying5.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{4. Currying (cnt.)} -\input{./content/VL2_currying6.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{4. Currying (cnt.)} -\input{./content/VL2_currying7.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{4. Currying (cnt.)} -\input{./content/VL2_currying8.tex} -\end{frame} - -\section{5. Function composition} - -\begin{frame} -\frametitle{5. Function composition} -\tableofcontents[currentsection,hideothersubsections] -\end{frame} - - -\begin{frame}[fragile] -\frametitle{5. Function composition (cnt.)} -\input{./content/VL2_composition1.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{5. Function composition} -\input{./content/VL2_composition2.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{5. Function composition} -\input{./content/VL2_composition3.tex} -\end{frame} - -\section{6. Recursion patterns} - -\begin{frame} -\frametitle{6. Recursion patterns} -\tableofcontents[currentsection,hideothersubsections] -\end{frame} - -\begin{frame}[fragile] -\frametitle{6. Recursion patterns (cnt.)} -\input{./content/VL2_rec_patterns1.tex} -\end{frame} - -\subsection{6.1. Map} - -\begin{frame}[fragile] -\frametitle{6.1. Map} -\input{./content/VL2_rec_patterns2.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{6.1. Map (cnt.)} -\input{./content/VL2_rec_patterns3.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{6.1. Map (cnt.)} -\input{./content/VL2_rec_patterns4.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{6.1. Map (cnt.)} -\input{./content/VL2_rec_patterns5.tex} -\end{frame} - -\subsection{6.2. Filter} - -\begin{frame}[fragile] -\frametitle{6.2. Filter} -\input{./content/VL2_rec_patterns6.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{6.2. Filter (cnt.)} -\input{./content/VL2_rec_patterns7.tex} -\end{frame} - -\subsection{6.3. Fold} - -\begin{frame}[fragile] -\frametitle{6.3. Fold} -\input{./content/VL2_rec_patterns8.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{6.3. Fold (cnt.)} -\input{./content/VL2_rec_patterns9.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{6.3. Fold (cnt.)} -\input{./content/VL2_rec_patterns10.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{6.3. Fold (cnt.)} -\input{./content/VL2_rec_patterns11.tex} -\end{frame} - -\begin{frame}[fragile] -\frametitle{6.3. Summary} -\input{./content/VL2_rec_patterns12.tex} -\end{frame} - -\section{7. Reflection} -\begin{frame} -\frametitle{7. Reflection} -\tableofcontents[currentsection,hideothersubsections] -\end{frame} - -\subsection{7.1. What you should know} - -\begin{frame} -\frametitle{7.1. What you should know now} -\input{./content/VL2_reflection1.tex} -\end{frame} - -\subsection{7.2. Questions for you} - -\begin{frame}[fragile] -\frametitle{7.2. Questions for you} -\input{./content/VL2_reflection2.tex} -\end{frame} - -\section{8. References} - -\begin{frame} -\frametitle{8. References} -\tableofcontents[currentsection,hideothersubsections] -\end{frame} - -\subsection{8.1. Links} - -\begin{frame} -\frametitle{8.1. Further reading and useful links} -\input{../common/content/VL_links.tex} -\end{frame} - -\subsection{8.2. Sources} - -\begin{frame} -\frametitle{8.2. Sources} -\input{../common/content/VL_sources.tex} -\end{frame} +\input{./VL2_document_structure.tex} \end{document} \ No newline at end of file diff --git a/VL2/VL2_document_structure.tex b/VL2/VL2_document_structure.tex new file mode 100644 index 0000000..723704b --- /dev/null +++ b/VL2/VL2_document_structure.tex @@ -0,0 +1,127 @@ +\section{Reiteration} + +\slidetoc + +\slide{./content/VL2_reiteration.tex} + + +\section{Polymorphism} + +\slidetoc + +\slide{./content/VL2_polymorphism1.tex} +\slide{./content/VL2_polymorphism2.tex}[ (cnt.)] + + +\section{More ways to define functions} + +\slidetoc + +\slide{./content/VL2_more_ways_to_define_functions.tex} + +\subsection{Where} + +\slide{./content/VL2_where.tex} + +\subsection{Let} + +\slide{./content/VL2_let.tex} + +\subsection{Let vs Where} + +\slide{./content/VL2_let_vs_where.tex} + +\subsection{Anonymous functions} + +\slide{./content/VL2_anonymous_functions.tex} + +\section{Currying} + +\slidetoc + +\slide{./content/VL2_currying1.tex} + +\subsection{Definition} + +\slide{./content/VL2_currying2.tex} + +\subsection{Mathematical example} +\slide{./content/VL2_currying3.tex} + +\subsection{Geometrical example} +\slide{./content/VL2_currying4.tex} + +\subsection{Conclusion} +\slide{./content/VL2_currying5.tex} + +\subsection{Partial application} +\slide{./content/VL2_currying6.tex}[ (cnt.)] + +\subsection{Curry and Uncurry} +\slide{./content/VL2_currying7.tex}[ (cnt.)] + +\subsection{Summary} +\slide{./content/VL2_currying8.tex}[ (cnt.)] + + +\section{Function composition} + +\slidetoc + +\slide{./content/VL2_composition1.tex} +\slide{./content/VL2_composition2.tex}[ (cnt.)] +\slide{./content/VL2_composition3.tex}[ (cnt.)] + + +\section{Recursion patterns} + +\slidetoc + +\slide{./content/VL2_rec_patterns.tex} + +\subsection{Map} + +\slide{./content/VL2_map1.tex} +\slide{./content/VL2_map2.tex}[ (cnt.)] +\slide{./content/VL2_map3.tex}[ (cnt.)] +\slide{./content/VL2_map4.tex}[ (cnt.)] + + +\subsection{Filter} + +\slide{./content/VL2_filter1.tex} +\slide{./content/VL2_filter2.tex}[ (cnt.)] + + +\subsection{Fold} + +\slide{./content/VL2_fold1.tex} +\slide{./content/VL2_fold2.tex}[ (cnt.)] +\slide{./content/VL2_fold3.tex}[ (cnt.)] +\slide{./content/VL2_fold4.tex}[ (cnt.)] +\slide{./content/VL2_fold5.tex}[ (cnt.)] + + +\section{Reflection} + +\slidetoc + +\subsection{What you should know} + +\slide{./content/VL2_what_you_should_know.tex} + +\subsection{Questions for you} + +\slide{./content/VL2_questions_for_you.tex} + +\section{References} + +\slidetoc + +\subsection{Links} + +\slide{../common/content/VL_links.tex} + +\subsection{Sources} + +\slide{../common/content/VL_sources.tex} \ No newline at end of file diff --git a/VL2/VL2_handout.tex b/VL2/VL2_handout.tex index b031e8f..ebe4f19 100644 --- a/VL2/VL2_handout.tex +++ b/VL2/VL2_handout.tex @@ -1,42 +1,6 @@ \documentclass[12pt,a4paper,fleqn,oneside]{article} -% packages -\usepackage{xcolor} -\usepackage[utf8]{inputenc} -\usepackage{amsmath} -\usepackage{amsfonts} -\usepackage{amssymb} -\usepackage{graphicx} -\usepackage{hyperref} -\usepackage{listings} -\usepackage{minted} - -% for \verb inside \item -\usepackage[T1]{fontenc} -\usepackage[Q=yes]{examplep} - -% package configuration -\DeclareGraphicsExtensions{.pdf,.png,.jpg} -\usemintedstyle{friendly} -\newminted{haskell}{frame=single,numbers=left,samepage=true} -\newminted{cpp}{frame=single,numbers=left} -\newminted{c}{frame=single,numbers=left} -\renewcommand{\theFancyVerbLine}{\ttfamily - \textcolor[rgb]{0.0,0.0,0.0}{\footnotesize - \oldstylenums{\arabic{FancyVerbLine}}}} - -% macros and environments -\newcommand{\code}[1]{\texttt{#1}} -\newcommand{\pause}{} -\newcommand{\slidep}{} -\newenvironment{itemizep} - {\begin{itemize}} - {\end{itemize}} - -% color definition -\definecolor{solarized}{HTML}{002B36} -\definecolor{mygreen}{rgb}{0,0.6,0} - +\input{../common/article_configuration.tex} \begin{document} @@ -48,100 +12,6 @@ \tableofcontents -\section{Reiteration} - -\input{./content/VL2_reiteration.tex} - - -\section{Polymorphism} - -\input{./content/VL2_polymorphism1.tex} -\input{./content/VL2_polymorphism2.tex} -\input{./content/VL2_polymorphism3.tex} - - -\section{More ways to define functions} - -\input{./content/VL2_define_functions1.tex} - -\subsection{Where} -\input{./content/VL2_define_functions2.tex} - -\subsection{Let} -\input{./content/VL2_define_functions3.tex} - -\subsection{Let vs Where} -\input{./content/VL2_define_functions4.tex} - -\subsection{Anonymous functions} -\input{./content/VL2_define_functions5.tex} - - -\section{Currying} - -\input{./content/VL2_currying1.tex} -\\\\ -\input{./content/VL2_currying2.tex} -\\\\ -\input{./content/VL2_currying3.tex} -\\\\ -\input{./content/VL2_currying4.tex} -\\\\ -\input{./content/VL2_currying5.tex} -\\\\ -\input{./content/VL2_currying6.tex} -\input{./content/VL2_currying7.tex} -\input{./content/VL2_currying8.tex} - -\section{Function composition} - -\input{./content/VL2_composition1.tex} -\input{./content/VL2_composition2.tex} -\input{./content/VL2_composition3.tex} - - -\section{Recursion patterns} - -\input{./content/VL2_rec_patterns1.tex} - -\subsection{Map} -\input{./content/VL2_rec_patterns2.tex} -\input{./content/VL2_rec_patterns3.tex} -\\\\ -\input{./content/VL2_rec_patterns4.tex} -\\\\ -\input{./content/VL2_rec_patterns5.tex} - -\subsection{Filter} -\input{./content/VL2_rec_patterns6.tex} -\\\\ -\input{./content/VL2_rec_patterns7.tex} - -\subsection{Fold} -\input{./content/VL2_rec_patterns8.tex} -\input{./content/VL2_rec_patterns9.tex} -\\\\ -\input{./content/VL2_rec_patterns10.tex} -\input{./content/VL2_rec_patterns11.tex} - -\subsection{Summary} -\input{./content/VL2_rec_patterns12.tex} - - -\section{Reflection} - -\subsection{What you should know} -\input{./content/VL2_reflection1.tex} - -\subsection{Questions for you} -\input{./content/VL2_reflection2.tex} - -\section{References} - -\subsection{Links} -\input{../common/content/VL_links.tex} - -\subsection{Sources} -\input{../common/content/VL_sources.tex} +\input{./VL2_document_structure.tex} \end{document} \ No newline at end of file diff --git a/VL2/content/VL2_define_functions5.tex b/VL2/content/VL2_anonymous_functions.tex similarity index 100% rename from VL2/content/VL2_define_functions5.tex rename to VL2/content/VL2_anonymous_functions.tex diff --git a/VL2/content/VL2_rec_patterns6.tex b/VL2/content/VL2_filter1.tex similarity index 100% rename from VL2/content/VL2_rec_patterns6.tex rename to VL2/content/VL2_filter1.tex diff --git a/VL2/content/VL2_rec_patterns7.tex b/VL2/content/VL2_filter2.tex similarity index 100% rename from VL2/content/VL2_rec_patterns7.tex rename to VL2/content/VL2_filter2.tex diff --git a/VL2/content/VL2_rec_patterns8.tex b/VL2/content/VL2_fold1.tex similarity index 100% rename from VL2/content/VL2_rec_patterns8.tex rename to VL2/content/VL2_fold1.tex diff --git a/VL2/content/VL2_rec_patterns9.tex b/VL2/content/VL2_fold2.tex similarity index 100% rename from VL2/content/VL2_rec_patterns9.tex rename to VL2/content/VL2_fold2.tex diff --git a/VL2/content/VL2_rec_patterns10.tex b/VL2/content/VL2_fold3.tex similarity index 100% rename from VL2/content/VL2_rec_patterns10.tex rename to VL2/content/VL2_fold3.tex diff --git a/VL2/content/VL2_rec_patterns11.tex b/VL2/content/VL2_fold4.tex similarity index 100% rename from VL2/content/VL2_rec_patterns11.tex rename to VL2/content/VL2_fold4.tex diff --git a/VL2/content/VL2_rec_patterns12.tex b/VL2/content/VL2_fold5.tex similarity index 100% rename from VL2/content/VL2_rec_patterns12.tex rename to VL2/content/VL2_fold5.tex diff --git a/VL2/content/VL2_define_functions3.tex b/VL2/content/VL2_let.tex similarity index 100% rename from VL2/content/VL2_define_functions3.tex rename to VL2/content/VL2_let.tex diff --git a/VL2/content/VL2_define_functions4.tex b/VL2/content/VL2_let_vs_where.tex similarity index 100% rename from VL2/content/VL2_define_functions4.tex rename to VL2/content/VL2_let_vs_where.tex diff --git a/VL2/content/VL2_rec_patterns2.tex b/VL2/content/VL2_map1.tex similarity index 100% rename from VL2/content/VL2_rec_patterns2.tex rename to VL2/content/VL2_map1.tex diff --git a/VL2/content/VL2_rec_patterns3.tex b/VL2/content/VL2_map2.tex similarity index 100% rename from VL2/content/VL2_rec_patterns3.tex rename to VL2/content/VL2_map2.tex diff --git a/VL2/content/VL2_rec_patterns4.tex b/VL2/content/VL2_map3.tex similarity index 100% rename from VL2/content/VL2_rec_patterns4.tex rename to VL2/content/VL2_map3.tex diff --git a/VL2/content/VL2_rec_patterns5.tex b/VL2/content/VL2_map4.tex similarity index 100% rename from VL2/content/VL2_rec_patterns5.tex rename to VL2/content/VL2_map4.tex diff --git a/VL2/content/VL2_define_functions1.tex b/VL2/content/VL2_more_ways_to_define_functions.tex similarity index 100% rename from VL2/content/VL2_define_functions1.tex rename to VL2/content/VL2_more_ways_to_define_functions.tex diff --git a/VL2/content/VL2_reflection2.tex b/VL2/content/VL2_questions_for_you.tex similarity index 100% rename from VL2/content/VL2_reflection2.tex rename to VL2/content/VL2_questions_for_you.tex diff --git a/VL2/content/VL2_rec_patterns1.tex b/VL2/content/VL2_rec_patterns.tex similarity index 100% rename from VL2/content/VL2_rec_patterns1.tex rename to VL2/content/VL2_rec_patterns.tex diff --git a/VL2/content/VL2_reflection1.tex b/VL2/content/VL2_what_you_should_know.tex similarity index 100% rename from VL2/content/VL2_reflection1.tex rename to VL2/content/VL2_what_you_should_know.tex diff --git a/VL2/content/VL2_define_functions2.tex b/VL2/content/VL2_where.tex similarity index 100% rename from VL2/content/VL2_define_functions2.tex rename to VL2/content/VL2_where.tex