CS795: Functional Programming
Evaluation: 3 projects and a final practical exam, each counting 25% towards the final mark.
2021: Lecture Times
Tuesdays 11:00 - 13:00.
- Lecture 1, 10 August 2021: See week 1, 2020
- Lecture 2, 17 August 2021. Read chapters 3 and 4 in the book by Graham Hutton. Do the 5 exercises at the end of Chapter 3 and exercises 7 and 8 at the end of Chapter 4.
- Lecture 3, 24 August, Chapters 5 & 6 in the book by Graham Hutton
- Lectures 4 and 5 - see SunLearn for uploaded lectures
- Lecture 6: Monadic Parsing - Code used in lecture
- Lecture 7: Functionally Solving Problems
- Lecture 8: Parts of chapters 11 and 12 in Learn You a Haskell for Great Good!
- Lecture 9: Monoids in Learn You a Haskell and Chapter 12 in Graham Hutton's book
- Lecture 10: How to improve the performance of reversing lists and flattening trees
- Lecture 11: Monads in Java - Dylan and Marco
- Lecture 12: 3 hour practical test
Three assignments and a practical test (25% each), no subminimum.
- Pancake Sorting and Spec.hs. Marks
- Monadic Parsing. Marks
- Viterbi Due: 12 November before 23:59
2020: Week 1
See SunLearn (rw795) for lecture recordings.
Have look at Stack and Cabal and how to set up a Haskell development environment for your particular platform.
Most of the content in my lectures will be from the book Programming in Haskell, 2nd Edition, Graham Hutton.
For week 1, read the first two chapters in the book by Graham Hutton, and do exercises 3, 4 and 5 at the end of Chapter 2 -
this is just to check your own understanding. Slides - these are the slides used in lectures.
Also read Chapter 1 in Write Yourself a Scheme in 48 Hours - An Introduction to Haskell through Example
and do the 3 exercises (not to be handed in) at the end of Chapter 1.
2020: Week 2
Read chapters 3 and 4 in the book by Graham Hutton. Do the 5 exercises at the end of Chapter 3 and exercises 7 and 8 at the end of Chapter 4.
As will always be the case, there are lecture recording for week 2 on SunLearn. Although not required to watch, I can recommend the GoogleTechTalks Haskell 101 and Haskell 102 by
Antoine Leblanc. There is also a Github repository with resources
related to these two talks.
2020: Week 3
Read Chapters 5 and 6.
Although Monday is a public holiday, work on the following problems and post solutions on MS Teams - I might only comment on Tuesday.
- Implement your own versions of fold and fold' (i.e. the strict version of foldl). It is enough to implement versions
that work on Lists, instead of on Foldable types.
- Exercises 6-9 at the end of Chapter 5
2020: Week 4
Read Chapter 7 (and watch the corresponding video lecture on SunLearn). In the Monday lecture we will discuss assignment 1.
Also modify the code
discussed in the video lecture w.r.t. the Luhn checksum by not reversing xs in the function luhn_sum and also summing over
the list of digits (representing the number for which the validity of the checksum digit is verified) after applying altMap by
using nSum += d / 10 and nSum += d % 10 (as is done in the Java implementation at
geeksforgeeks), instead of using the current function luhn_sub. Also
suggest other improvemets to my current implementation of the Luhn checksum.
2020: Week 5
Read Chapter 8 (and watch the corresponding video lecture on SunLearn). Look at the following exercises at the end of
Chapter 8: 1, 3, 8.
2020: Week 6
Read Chapter 15 (and watch the corresponding video lecture on SunLearn). Look at the following exercises at the end of
Chapter 15: 5, 6. Select groups (size 3 or 4) for assignment 2. Send and e-mail to brinkvdm at gmail dot com with a
document containing the following information: Group members and a description of the selected project for assignment 2
(and other information deemed relevant).
2020: Week 7
Read Chapter 9 and work on exercise 6 at the end of Ch 9. Watch the video lectures under Weeks 7, 8 and 9 on SunLearn.
2020: Week 8
Watch the video lecture on functional parsers, listed under week 10, on SunLearn.
2020: Week 9
Watch the video lecture on SunLearn on how to create your own Monadic Either type. We will also
continue with presentations for the 2nd project as scheduled on MS Teams.
2020: Week 10 -> end of semester
A collection of video discussions wil be posted on SunLearn on some of the posts at Monday Morning Haskell.
Books and other relevant links and resources
Why should you take this course
Functional programming is a style of programming in which the primary method of computation is the application of functions to arguments. It offers a compact notation for writing programs, powerful abstraction methods for structuring programs, and a simple mathematical basis that supports reasoning about programs.
Functional languages represent the leading edge of programming language design, and the primary setting in which new programming concepts are introduced and studied.