SluitenHelpPrint
Switch to English
Cursus: INFOFP
INFOFP
Functioneel programmeren
Cursus informatie
CursuscodeINFOFP
Studiepunten (EC)7,5
Cursusdoelen

By the end of the course you will be able to

  • solve problems using a ‘functional approach’. That is, define what needs to be computed using techniques and concepts such as
    • recursion,
    • pattern matching,
    • composition,
    • higher order functions,
    • algebraic data types,
    • monads,
    • immutable and persistent data structures, and
    • laziness.
  • reason about the correctness and the types of functions.
  • develop a small, real world game in the functional language Haskell.
Inhoud

This course introduces functional programming through the programming language Haskell.
In contrast with the language C# – introduced in Imperatief/Game/Mobiel programmeren – which is based on statements, organized in methods and classes, functional programming is based entirely on expressions and functions. This shifts the focus from how a program operates to what is does.

Concrete topics treated in this course include higher-order functions, parametric and ad-hoc polymorphism (also known as generics and overloading in other programming languages), algebraic data types and pattern matching.
These ideas appear not only in Haskell, but in other modern languages such as Scala, Swift or Kotlin. An important part of the course is devoted to reasoning about programs, either by equations or by induction.

The language Haskell imposes a strong separation between pure computations and those with side-effects, such as input and output.
Monads are introduced to model the idea of sequential computation in a functional language. Similar abstractions such as functors are also part of the contents of this course.

Course form
  • 2 × 2 hours lectures
  • 1 × 2 hours practicals
  • 1 × 2 hours group tutorials
Attendance is not strictly mandatory (albeit recommended).

Literature
  • Slides from the lectures
  • Mandatory reading: "Programming in Haskell"  by Graham Hutton
  • Additional material:
    • Lecture Notes from 2015/2016
    • "Learn You a Haskell for Great Good" by Miran Lipovača
    • Haskell Wikibook
SluitenHelpPrint
Switch to English