2015-04-19 22:32:50 +00:00
|
|
|
\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}
|
|
|
|
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
% title page information
|
|
|
|
\author{Julian Ospald}
|
|
|
|
\title{Haskell: higher order functions}
|
|
|
|
|
|
|
|
\maketitle
|
|
|
|
|
|
|
|
\tableofcontents
|
|
|
|
|
|
|
|
\section{Reiteration}
|
|
|
|
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_reiteration.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
\section{Polymorphism}
|
|
|
|
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_polymorphism1.tex}
|
|
|
|
\input{./content/VL2_polymorphism2.tex}
|
|
|
|
\input{./content/VL2_polymorphism3.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
\section{More ways to define functions}
|
|
|
|
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_define_functions1.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Where}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_define_functions2.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Let}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_define_functions3.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Let vs Where}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_define_functions4.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Anonymous functions}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_define_functions5.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
\section{Currying}
|
|
|
|
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_currying1.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
\\\\
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_currying2.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
\\\\
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_currying3.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
\\\\
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_currying4.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
\\\\
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_currying5.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
\\\\
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_currying6.tex}
|
|
|
|
\input{./content/VL2_currying7.tex}
|
|
|
|
\input{./content/VL2_currying8.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\section{Function composition}
|
|
|
|
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_composition1.tex}
|
|
|
|
\input{./content/VL2_composition2.tex}
|
|
|
|
\input{./content/VL2_composition3.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
\section{Recursion patterns}
|
|
|
|
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_rec_patterns1.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Map}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_rec_patterns2.tex}
|
|
|
|
\input{./content/VL2_rec_patterns3.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
\\\\
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_rec_patterns4.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
\\\\
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_rec_patterns5.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Filter}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_rec_patterns6.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
\\\\
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_rec_patterns7.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Fold}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_rec_patterns8.tex}
|
|
|
|
\input{./content/VL2_rec_patterns9.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
\\\\
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_rec_patterns10.tex}
|
|
|
|
\input{./content/VL2_rec_patterns11.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Summary}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_rec_patterns12.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
\section{Reflection}
|
|
|
|
|
|
|
|
\subsection{What you should know}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_reflection1.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Questions for you}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{./content/VL2_reflection2.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\section{References}
|
|
|
|
|
|
|
|
\subsection{Links}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{../common/content/VL_links.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\subsection{Sources}
|
2015-04-19 22:51:14 +00:00
|
|
|
\input{../common/content/VL_sources.tex}
|
2015-04-19 22:32:50 +00:00
|
|
|
|
|
|
|
\end{document}
|