en | de

Functional Programming

bachelor program

VO2 + PS1  WS 2011/2012  703024 + 703025

Content

The course provides an introduction to functional programming, covering both, practical examples using OCaml (a functional language) and theoretical background. Course notes are available.

Schedule

week date topics slides sources exercises
1 05.10. historical overview, OCaml introduction, first steps pdf (1x1) tar.gz pdf
2 12.10. lists, polymorphism, higher-order functions pdf (1x1) tar.gz pdf
3 19.10. modules, strings pdf (1x1) tar.gz pdf  pdf  pdf
4 09.11. user-defined types, trees pdf (1x1) tar.gz pdf
5 16.11. lambda-calculus pdf (1x1) tar.gz pdf
6 23.11. lambda calculus, evaluation strategies pdf (1x1) tar.gz pdf
7 30.11. induction, reasoning about functional programs pdf (1x1) pdf
8 07.12. efficiency, tail-recursion pdf (1x1) pdf
9 14.12. parsing pdf (1x1) tar.gz pdf
10 11.01. types, type checking, type inference pdf (1x1) pdf
11 18.01. implementing type inference pdf (1x1) tar.gz pdf
12 25.01. lazy evaluation, infinite data structures pdf (1x1) tar.gz pdf
13 01.02. first exam
14 02.03. second exam
15 28.09 third exam

Literature

Amongst other sources the course incorporates material from the following books:

Typos

location wrong correct
course notes, p21, Listing 2.1 (n-1) n
course notes, p53 be repeated by repeated
course notes, p79, Definition of range n::acc (n-1)::acc
course notes, p80, Exercise 7.3, definition of reverse let reverse let rec reverse
course notes, p80, Exercise 7.3, definition of reverse append xs [x] append (reverse xs) [x]
course notes, p80, Hint of Exercise 7.3 rev reverse
course notes, p80, Hint of Exercise 7.3 append xs (append ys zs) = append xs (append ys zs) append xs (append ys zs) = append (append xs ys) zs
course notes, p82, after Example 8.3, type of return 'a -> 'a t 'a -> ('a,'t) t
course notes, p83, function parse input s (2x)
course notes, p94, Exercise 8.1 drop superfluous "}"
course notes, p95, Exercise 8.3 drop "parser such that"
course notes, p101 an inference rules an inference rule
course notes, p102,l3 E, E
course notes, p121,Exercise 10.4 [1;2;3;4;4;6;7;8;10;...] [1;1;2;3;4;4;6;7;8;10;...]