Week |
Date |
Topic |
Read |
Exercises |
36 |
6. Sept. |
Course introduction
Intro. to functional programming and F#
Lists (brief introduction)
|
HR 1,
HR 2.1-2.6,
HR 4.1-4.3
|
Installation of F# and first programs
See Material folder on DTU Learn
|
37 |
13. Sept. |
Functions, Basic types, Tuples and Lists
|
HR 2, HR 3.1-3.3, 3.5, 3.6
HR 4.1 - 4.4
|
- HR 1.5, HR 2.2, 2.8, HR 4.7
- Mini-project on polynomials: Part 1
See Material folder on DTU Learn
|
38 |
20. Sept. |
Programming as a model-based activity
Property-based testing - Briefly
|
HR 3.4-3.7, HR 4
|
- HR 2.1, 4.3, 4.8, 4.9, 4.12
- Consider your solution to 4.7 and make an evaluation of 'multiplicity 2 [1; 2; 8; 2]'
- Exercise on polynomials: Part 2. You may also consider/start on Part 3
- Paper and pencil exercises: HR 4.16, 4.17
- Write F#-programs having the types (1) bool -> bool, (2) int -> int -> int, (3) 'a -> 'b -> 'a and (4) 'a -> ('a -> 'b) -> 'b
- Merge sort. A program to generate random lists is here
|
39 |
27. Sept. |
Disjoint union (Tagged values)
Higher-order list functions
On types for functions - briefly
|
HR 3.8-3.11, HR 5.1
|
- Paper and pencil exercises: HR 4.18. Give an argument for the type of f.
- SimpleCompanyClub.
- AirportProblem.pdf
- Exercise on polynomials: Part 3. you may also consider starting on Part 5 (invariant checking).
|
40 |
4. Oct. |
Lecture slot: Recap of fundamental concepts
Selected old exam questions will be handed out (on Learn).
- Should be solved using paper and pencil only
- Solutions will be presented.
|
|
- HR 5.3
- Make a revised version of the Cash register example in Section 4.6 where:
- The function findArticle is replaced by an application of List.tryFind
- The function makeBill is declared using List.foldBack
- Map coloring: validation of properties
- Polynomial exercise: Part 4. Thereafter, you can complete Part 5.
|
41 |
11. Oct. |
Collections: Sets and Maps
From 11:10 - 12:00: Functional Programming in the Wild
Guest lecture by Torben Hoffmann
VP, Business Unit Lead for Erlang Solutions London, a Trifork company
|
HR 5.2-5.3
|
- Solve the Airport problem from Week 4 using functions from the List-library, whenever that is appropriate.
- Solve the following two problems from old exams, where you should start with solutions based on "plain" recursive functions. Provide, thereafter, solutions to questions using functions from the List library, when that makes sense.
- Problem 2 from Exam, Summer 2015.
- Problem 1 from Exam, Fall 2013. Question 6 can be solved when the topic Map has been studied.
Old exams can be found here
|
42 |
18. Oct. |
Autumn vacation
|
|
|
43 |
25. Oct. |
Modules
Type inference shortly
|
HR 7 |
- Revise your solution of the simple company club problem (Week 39) using sets and maps whenever that is appropriate.
- Problem 1 from Exam, Fall 2013.
- Problem 1 from Exam, Fall 2015.
Old exams can be found here
|
44 |
1. Nov. |
Finite trees (I)
|
HR 6
|
- Part 6 of exercise on polynomials
- Week8.pdf
- Part 1 from Mini-project 2: Simple Compiler. See Material folder on DTU Learn.
|
45 |
8. Nov. |
Finite trees (II)
|
HR 6
|
- File System
- Mini-project 2: Simple Compiler. See Material folder on DTU Learn.
|
46 |
15. Nov. |
Tail recursion
|
HR 9
|
- Week10.pdf
- Complete the simple-compiler miniproject.
- Start on the mini-project on propositional logic
|
47 |
22. Nov. |
Sequences
Property-based testing shortly
|
HR 11 |
- Summer exam 02157-2014, Problem 1(1,2,3) -- available here
- Fall exam 02157-2014, Problem 2(4,5) -- available here
- Week11.pdf
Continue with mini-project on propositional logic.
|
48 |
29. Nov. |
Verification shortly
Work on exam questions May 2023 and May 2024 (uploaded to Learn) in the auditorium:
- Exam, May 2023: Problems 3,4,5. Concerning Problems 1 and 2, have a look at the problems for Week 5, lecture part.
- Exam, May 2024: Problem 2. Remaining problems should be solved in Week 13.
|
|
- 11.1 and 11.9
- CollatzConjecture.pdf
- Week12.pdf
- Summer exam 2014, Problem 1(4,5) -- available here
- Fall exam 2014, Problem 2(1,2,3) -- available here
|
49 |
6. Dec. |
From 10:15 - 12:00 in the auditorium
- Continue work on exam set from May 2024. See Material folder on Learn.
A TA will be available in the auditorium from 10:15 - 12:00
A solution will be uploaded to Learn.
|
|
From 8:15 - 10:00 in the exercise class:
- Work on exam set from May 2024. See Material folder on Learn.
|