Skip to content
Snippets Groups Projects
Forked from lamp / CS-210 Functional programming
76 commits behind the upstream repository.

This repository will be used as the website for Functional Programming CS-210. It will be updated weekly throughout the semester. This README contains general information about the class.

  • previous-exams contains PDFs for the previous exams.
  • exercises contains markdown documents for the exercise sessions and solutions.
  • slides contains the slides presented in class (also attached or respective videos).
  • labs contains markdown documents for the labs.

We will use GitLab's issue tracker as a discussion forum. Feel free to open an issue if you have any comments or questions

First-week Tasks

  1. Join the Discord.
  2. Log into EPFL's GitLab.
  3. Fill in this table with your GASPAR and SCIPER number to initialize your GitLab repository for the course (login with your @epfl.ch address to have write access).
  4. Choose a group for the exercises (recitation sessions) by answering this Doodle.
  5. Follow the Tools Setup page.
  6. Do the example lab.
  7. Do the first graded lab.

Grading

The grading of the course is divided between labs (30%), a midterm exam (20%) and a final exam (50%).

Staff

Role People
Professors Martin Odersky, Viktor Kunčak
TAs Dragana Milovancevic, Ergys Dona, Jean-Baptiste Cordonnier, Matthieu Bovel
Student TAs Joshua Bernimoulin, Mohamed Yassine Boukhari, Hind El Bouchrifi , Luca Giordano, Mohamed Hichem Hadhri, Salim Najib, Arthur Vignon

Lecture Schedule

Lectures are prerecorded and published below. This class is given in a flipped classrom format, meaning that you should watch the videos by yourself before the indicated date. You will then have the occasion to test and perfect your knowledge during the exercises (recitation sessions) on Wednesday afternoons, and labs on Friday mornings.

Note: In some lectures, worksheets are used to present code. To learn how to use worksheets yourselves, please follow the Tools Setup and example lab. To create a new empty project to experiment with worksheets, you can clone the following repository and run code . inside as usual: git clone https://gitlab.epfl.ch/lamp/cs210-worksheets

Week Date Topic Videos & Slides
1 22.09.2021 Intro class Introduction (Video, Slides)
Elements of programming (Video, Slides)
Evaluation strategies and termination (Video, Slides)
Value Definitions and Conditionals (Video, Slides)
Square Roots with Newtons Methods (Video, Slides)
Blocks and lexical scopes (Video, Slides)
Tail Recursion (Video, Slides)
2 29.09.2021 Recursion / Function values Higher-Order Functions (Video, Slides)
Currying (Video, Slides)
Finding FixedPoints (Video, Slides)
Scala Syntax Summary (Video, Slides)
Functions and Data (Video, Slides)
Data Abstraction (Video, Slides)
Evaluation and Operators (Video, Slides)
3 06.09.2021 Classes Class Hierarchies (Video, Slides)
How Classes are Organized (Video, Slides)
Polymorphism (Video, Slides)
Objects Everywhere (Video, Slides)
Functions as Objects (Video, Slides)
4 13.10.2021 Classes Decomposition (Video, Slides)
Pattern Matching (Video, Slides)
Lists (Video, Slides)
Enums (Video, Slides)
Subtyping and Generics (Video, Slides)
Variance (Video, Slides)
5 20.10.2021 List A closer look at lists (Video, Slides)
Tuples and generic methods (Video, Slides)
Higher order list functions (Video, Slides)
Reduction of lists (Video, Slides)
Reasoning about lists (Video, Slides)
6 27.10.2021 Collection Other Collections (Video, Slides)
Combinatorial Search and For-Expressions (Video, Slides)
Combinatorial Search Example (Video, Slides)
Maps (Video, Slides)
Putting the Pieces Together (Video, Slides)
7 03.11.2021 Monads Recap (Video, Slides)
Queries with for (Video, Slides)
Translation of for (Video, Slides)
Functional Random Generators (Video, Slides)
Monads (Video, Slides)
Exceptional Monads (Video, Slides)
8 10.11.2021 Midterm exam -
9 17.11.2021 Lazy evaluation Structural Induction on Trees (Video, Slides)
Lazy Lists (Video, Slides)
Lazy Evaluation (Video, Slides)
Infinite Sequences (Video, Slides)
Case Study (Video, Slides)
10 24.11.2021 Type-directed computation Contextual abstraction (Video, Slides)
Using clauses and given instances (Video, Slides)
Type classes (Video, Slides)
Abstract algebra and type classes (Video, Slides)
Context passing (Video, Slides)
Implicit function types (Video, Slides)
11 01.12.2021 State Functions and state (Video, Slides)
Identity and change (Video, Slides)
Loops (Video, Slides)
Discrete Event Simulation (Video, Slides)
12 08.12.2021 Interpreter I Interpreter for Arithmetic (Video, Slides)
Substitution Interpreter for Recursive Functions (Video, Slides)
Environment Instead of Substitutions (Video, Slides)
Higher-Order Functions Using Naive Substitutions (Video, Slides)
Avoiding Variable Capture (Video, Slides)
Higher-Order Functions Using Environments (Video, Slides)
Nested Recursive Definitions (Video, Slides)
13 15.12.2021 Parsing with Combinators / Lambda Calculus Parsing with Combinators (Video)
Recursion as Self-Application (Video)
Church Numerals and Conditionals (Video)
14 22.12.2021 Final exam -

Exercise (Recitation Session) Schedule

Exercises (aka recitation sessions) take place on Wednesdays from 13:15 to 15:00 in CO1, CO015, CO016, CO017, DIA004 and DIA005. Please go to the room that you registered to on Doodle. If you have forgotten which room you chose, please ask a TA on Discord (we cannot publish the whole list for privacy reasons).

Title Handout Released Session (Wednesdays 13:15 to 15:00) Solution Released
First week tasks - 22.09.2021 -
Exercise Session 1 27.09.2021 29.09.2021 04.10.2021
Exercise Session 2 04.10.2021 06.10.2021 11.10.2021
Exercise Session 3 11.10.2021 13.10.2021 18.10.2021
Exercise Session 4 18.10.2021 20.10.2021 25.10.2021
Exercise Session 5 25.10.2021 27.10.2021 01.11.2021
Exercise Session 6 01.11.2021 03.11.2021 08.11.2021
Midterm exam -  10.11.2021 -
Exercise Session 7 15.11.2021 17.11.2021 22.11.2021
Exercise Session 8 22.11.2021 24.11.2021 29.11.2021
Exercise Session 9 29.11.2021 01.12.2021 & 08.12.2021 13.12.2021
Exercise Session 10 06.12.2021 08.12.2021 & 15.12.2021 20.12.2021
Final exam - 22.12.2021 -

Exercises are pen and paper style questions that will prepare you for the final exam. Exercises should be done in groups.

Lab Schedule

Lab sessions take place on Fridays from 10:15 to 12:00 in CO021, ELA1, ELD120, DIA005 and DIA004.

Title Start Date Session (Fridays 10:15 to 12:00) Due Date (AoE)
Recursion 22.09.2021 24.09.2021 03.10.2021
Functional Sets 29.09.2021 01.10.2021 07.10.2021
Object-Oriented Sets 06.10.2021 08.10.2021 14.10.2021
Huffman Coding 13.10.2021 15.10.2021 & 22.10.2021 28.10.2021
Anagrams 27.10.2021 29.10.2021 11.11.2021
Quickcheck 03.11.2021 05.11.2021 18.11.2021
Bloxorz 10.11.2021 12.11.2021 & 19.11.2021 25.11.2021
Codecs 24.11.2021 26.11.2021 & 03.12.2021 09.12.2021
Interpreter 08.12.2021 10.12.2021 & 17.12.2021 23.12.2021

Labs are individual assignments where you get to write Scala programs using the concepts learned during lectures. Labs are submitted by pushing your code on GitLab, see details in the grading and submission page.

Exam Schedule

The midterm exam will be on 10.11.2021.

The final exam will be on 22.12.2021.

Information about exam organization will be communicated by email a few days before the exam.