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
| # | Title | Content |
|---|---|---|
| 1. | Introduction | Introduction to Racket and the DrRacket IDE. Practice prefix notation by writing pure recursive functions over strings. |
| 2. | Lists & Trees | The main purpose of this lab is to practice elementary recursive manipulation with lists |
| 3. | Higher Order Functions | Deals with higher-order functions like map, filter, foldl. |
| 4. | Tree Recursion | Practice operations over trees. |
| 5. | Streams and graphs | Introduction to streams and their application to infinite sequences and graph theory. |
| 6. | Interpreters | Implement an interpreter of Brainf*ck in a functional way. |
Lambda Calculus
| # | Title | Content |
|---|---|---|
| 7. | Lambda Calculus | Identify 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
| # | Title | Content |
|---|---|---|
| 8. | Introduction to Haskell | Practice function definitions using pattern matching and guarded equations. |
| 9. | Haskell Types | Define types to represent binary trees and polynomials. |
| 10. | Type Classes | Haskell functions can be polymorphic. Parametric polymorphism is implicit, but function overloading is accomplished using type classes. |
| 11. | Functors and IO | Introduces Haskell's IO and the typeclass Functor. Write a deterministic finite automation which only accepts valid fixed-point numbers. |
| 12. | Monads in action | From 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 Monad | This lab is focused on the State monad. |