Skip to content

Labs

The labs usually consist of two parts. In the first part, the teacher introduces new concepts from the last lecture and shows students how to use them. In the second part, students are given tasks that they try to solve individually.

The solutions to the given tasks will be available after the last lecture of the week.

Racket

#TitleContent
1.IntroductionIntroduction to Racket and the DrRacket IDE. Practice prefix notation by writing pure recursive functions over strings.
2.Lists & TreesThe main purpose of this lab is to practice elementary recursive manipulation with lists
3.Higher Order FunctionsDeals with higher-order functions like map, filter, foldl.
4.Tree RecursionPractice operations over trees.
5.Streams and graphsIntroduction to streams and their application to infinite sequences and graph theory.
6.InterpretersImplement an interpreter of Brainf*ck in a functional way.

Lambda Calculus

#TitleContent
7.Lambda CalculusIdentify beta-reducible terms and practice beta-reduction of lambda expressions. Use the Y-combinator to implement a recursive function which computes the length of a list.

Haskell

#TitleContent
8.Introduction to HaskellPractice function definitions using pattern matching and guarded equations.
9.Haskell TypesDefine types to represent binary trees and polynomials.
10.Type ClassesHaskell functions can be polymorphic. Parametric polymorphism is implicit, but function overloading is accomplished using type classes.
11.Functors and IOIntroduces Haskell's IO and the typeclass Functor. Write a deterministic finite automation which only accepts valid fixed-point numbers.
12.Monads in actionFrom simple examples of monadic composition to a hierarchical definition of parser for a complex grammar. Complete an application which finds the shortest path between two points in a maze.
13.State MonadThis lab is focused on the State monad.