Welcome to the page for the University of Strathclyde's “Functional Programming” class (CS316).
This course has a Twitter account.
Assessment: this course is entirely assessed by coursework. There are three exercises that you will complete (details below). You will do roughly 60% of the exercise at home or in the labs, and the 40% is done in exam conditions in the lab.
See the schedule.
The course lecturer is Bob Atkey. Office LT1305 robert.atkey@strath.ac.uk.
Lectures are at 13:00 Tuesdays in RC540 and 11am Fridays in RC447.
Most of the lectures involve me doing live coding with explanations of what I am doing. This repository contains cleaned up versions of the live coding, interspersed with commentary.
- Lecture 01 : Data and Pattern Matching (live version)
- Lecture 02 : Defining Functions (live version)
- Lecture 03 : Recursive functions I (live version)
- Lecture 04 : Recursive functions II (notes pending, see notes for Lec03)
- Lecture 05 : Higher order functions (live version)
- Lecture 06 : List comprehensions (live version)
- Lecture 07 : Modelling with datatypes (live version)
- Lecture 08 : Recursion Schemes (live version)
- Lecture 09 : Functors and Containers (needs minor updating) (live version)
- Lecture 10 : Programming with Exceptions
- Lecture 11 : Programming with Side Effects (live version)
- Lecture 12 : Monads (live version)
- Lecture 13 : I/O (live version)
- Lecture 14 : Parser Combinators I (live version)
- Lecture 15 : Parser Combinators II (live version)
- Lecture 16 : Monads, Data Dependency, and Applicative Functors (live version)
- Lecture 17 : Lazy Evaluation and Infinite Data
- Lecture 18 : no lecture
- Lecture 19 : Parallelism
- Lecture 20 : Concurrency
- Lecture 21 : CS410 Propaganda
The Evaluation Game.
This course is entirely assessed by coursework. The split between the three exercises is shown below:
-
Exercise 1 (30%) : First Order Programming. This was released on Thursday 3rd October (week 2), and the final deadline and test are on Monday 21st October (week 5).
-
Exercise 2 (30%) : Higher Order Programming. This was be released on Thursday 17th October (week 4), and the final deadline and test are on Monday 11th November (week 8). Example pictures green-everywhere, blue-and-green, doughnut, red-circle-on-blue, red-rect-on-blue, and picture.
-
Exercise 3 (40%) : GHOUL. This was be released on Thursday 7th November (week 7), and the final deadline and test are on Monday 2nd December (week 11). Example GHOUL programs plus.ghoul.
After each of the exercises has been marked, we will email you your marks
The following are some links to uses of Haskell in industry. These kinds of experience reports are often useful to see what engineers find useful in Haskell, and what they don't. Many of the features of Haskell (higher order functions, algebraic datatypes, pattern matching, immutability, type classes) are making their way into other languages because they have proved their worth in Haskell.
- Fighting spam with Haskell at Facebook.
- Habito: The Purely Functional Mortgage Broker.
- Semantic is GitHub's tool for analyzing source code to connect uses with definitions, and to look for differences between pieces of code.
Other functional languages are also used at extremely large scale. For example:
- WhatsApp uses the functional programming language Erlang for all its backend services.
- Jane Street is a proprietary trading firm that almost exclusively uses the functional language OCaml. They also offer internships for undergraduates.