Database Research Group

WSI – Database Systems Research Group

Functional Programming


News
  • Apr 20, 2017 — Die Anmeldung zu den Übungen in "Funktional Programming” ist nun freigeschaltet. Wir weden zur Übungsorganisation GitHub Classroom, sowie unser Forum einsetzen.

    Bitte folgt dieser Anleitung, um euch zu den Übungen anzumelden.

    Es werden in der Regel wöchentlich, jeweils Freitags Übungsblätter ausgegeben. Lösungen müssen immer bis einschließlich Donnerstag der Folgewoche (23:59 Uhr) abgegeben werden. Ein erstes Übungsblatt wird morgen, am Fr. 21.04.17, erscheinen.

    Eine Besprechung der Übungsblätter findet im Tutorium, Dienstags von 14-16 Uhr, statt. Der erste Termin ist am Di. 25.04.17. Inhaltlich werden wir dann noch nicht sonderlich weit fortgeschritten sein, es können dort aber Fragen zur Installation und Nutzung der Tools, sowie zur Organisation geklärt werden. Die Teilnahme am Tutorium ist nicht verpflichtend.

    Ich freue mich auf das kommende Semester mit euch!

    Beste Grüße Benjamin — Benjamin Dietrich


Numbers are values. Strings are values. Booleans are values. In "functional programming", functions are "simply" values as well. This view on programming leads to an elegant and expressive programming paradigm which we will investigate in this course. During the course, we will use the programming language Haskell. The majority of the concepts we will consider applies in other (functional) languages as well.

Participants are not expected to be fluent in Haskell from the beginning. We will spend the first three weeks of the semester on a Haskell Ramp-Up. Things will progress rather fast, though. The majority of the semester will be used for the good stuff: intermediate and advanced topics, of which there are plenty.

Forum

Discussion around this course and Haskell in general are encouraged in the forum. Please stop by regularly, have a look, and say "hi".

Tutorial and Exercises

  • Regular weekly tutorials will only start on Tuesday, April 25.

  • We will provide weekly exercise sheets.

  • You are admitted to the final exam if you score at least ⅔ of the overall exercise points.

  • Scoring well in the exercises leads to substantial bonus points in the final exam.

Haskell (GHC, Haskell Platform)

The course will use the de-facto standard Haskell compiler GHC and its interactive variant (also known as read-eval-print loop or REPL) GHCi. We strongly suggest you download and install the so-called Haskell Platform which includes both GHC and GHCi (and more). Available for virtually all operating systems, including Windows, Linux, OS X. Make sure to install the recent version 8.0.2.

Literature

The following introductory books and courses on Haskell are recommend reading — some of these are available online:

We will refer to additional material for the individual topics during the semester.


Additional material (code, data)
NrFileDownload
1chewie.hs

The Hello, World! of Haskell.

  1. Compile with Haskell compiler ghc via ghc --make chewie.hs, execute on the command line with ./chewie.
  2. Load into REPL ghci via ghci chewie.hs, then evaluate function main.
hs
2isPrime.hs

Prime number test. Efficient thanks to lazy evaluation of factors (a comparison with the empty list [] can be decided once the first element of factors has been found).

hs
3infix-op.hs

Demonstrates the definition of user-defined operator ~=~.

hs