Welcome to the source code repository for the University of Strathclyde CS316 “Functional Programming” course.
This is a course designed to teach Haskell to undergraduate students. The written course materials are available from this repository. Video lectures and access to the Mattermost forum for this course are available to Strathclyde students via the course's MyPlace page.
The code in this repository is structured as a Cabal project. You will need to install GHC (the Haskell compiler) and Cabal to get started. It is also advisable to install HLS (the Haskell Language Server) and an LSP-capable editor (e.g. Emacs or VSCode) to read and edit the code.
To load the code into ghci
for interactive exploration, you can used
$ cabal repl
which will load all the lecture notes into the interactive ghci
repl. Use import WeekXX
to open a particular module for experimentation. Using the command :reload
to reload after any changes are made.
The lecture notes for this course are intended to accompany the video lectures (only available to Strathclyde students for now), and provide mostly the same information in a searchable, accessible and less bandwidth hungry format.
The notes are Haskell files with interleaved code and commentary. You are encouraged to experiment by loading these files into ghci
(using cabal repl
) and editing them. Each week also has a set of tutorial questions with solutions that you should have a go at to test your knowledge.
- Lecture notes : Data and Functions
- Tutorial Problems
- Tutorial Solutions
- Live Lecture code (Tuesday)
- Live Lecture code (Friday)
- Week 2 : Solving Problems by Recursion
- Week 3 : Higher Order Functions
You can take a look at last year's notes for similar notes and some different exercises.