The materials of this course are distributed under the [[https://en.wikipedia.org/wiki/Creative_Commons_license][Creative
Commons Attribution Alone licence]].
* Introduction
The fundamental ideas behind functional programming are introduced,
with particular focus on handling functions as first-class values
and on higher order functions. Strict and static typing discipline
in Haskell is discussed and compared to typing disciplines in other
mainstream programming languages. Basic syntax is described along
with the explanations, including the syntax for definitions of
simple data types.
The slides of this part are available [[file:../content/courses/h4life/h4life-01.pdf][here]]. [[file:../content/courses/h4life/h4life-funcs.hs][This file]] contains the
examples.
* Typeclasses
Typeclasses in Haskell are introduced and compared to classes and
types in other mainstream programming languages. Subtle differences
are pointed out and discussed at length to avoid confusion.
The slides of this part are available [[file:../content/courses/h4life/h4life-02.pdf][here]]. [[file:../content/courses/h4life/h4life-types.hs][This]] and [[file:../content/courses/h4life/h4life-typeclasses.hs][this file]]
contain the examples. The former file contains Unicode characters,
so be sure to choose the correct Unicode encoding (UTF-8) to view it
properly.
* Monads
Monads as a way to encapsulate repetitive details of the computation
are introduced. The =Maybe= and =List= monads are described. An
overview of the monads =Reader=, =Writer=, and =State= is provided.
The slides of this part are available [[file:../content/courses/h4life/h4life-03.pdf][here]]. [[file:../content/courses/h4life/h4life-monads.hs][This file]] contains the
examples.
* Parallel and Concurrent Programming
Techniques of parallel and concurrent programming in Haskell are
described. Sparks as building blocks for a parallel program are
discussed. Spawning threads and synchronising them via thread-safe
shared storage is covered. A basic port scanner is presented as a
practical example.
The slides of this part are available [[file:../content/courses/h4life/h4life-04.pdf][here]]. The sorting example can
be found [[file:../content/courses/h4life/h4life-sorting.hs][here]]. The source code of the port scanner is available