Free Course On Functional Programming in Haskell
Written by Nikos Vaggalis   
Monday, 22 March 2021

Videos from an introductory course by Professor Graham Hutton from the University of Nottingham have been made freely available on YouTube. Designed for first year Computer Science students, they teach the basic principles of functional programming using Haskell.

Graham Hutton is a well-known authority for the FP community. He is a Professor of Computer Science at the University of Nottingham, where he co-leads the Functional Programming Lab. He is an editor of the Journal of Functional Programming, a member of IFIP WG 2.1 on Algorithmic Languages and Calculi, and has served as Vice-Chair of the ACM Special Interest Group on Programming Languages and as the Steering Committee Chair of the International Conference on Functional Programming.

Although the course is done in Haskell, it primarily is about the Functional Programming mindset using Haskell as the vehicle to get there. It's also an opportunity to get to discover Haskell, a language unlike any other that transforms the way developers think about programming and helps them to improve their overall abilities.

As Haskell is a purely functional language, when you write a program in it you are in essence writing mathematical functions.It's where a good background in mathematics will help you in programming, something that finally answers the timeless question of whether you need maths in order to program, a topic explored in Does Math Help Programming Or Programming Help Math?.

The course in its introduction tries to answer the questions of what functional programming actually means and where did it come from engaging in a historical flashback.In highlighting the difference between purely functional languages and those supporting functional programming,like Java, is that the former support and encourage the functional style.

A great introductory example is that of contrasting quick sorting in Haskell versus any imperative language.It starts with the display of some incomprehensible appearing formal mathematical types and majestically demystifies them with simple substitutions.

That's what the essence is. By combating the initial fear that mathematical notations raise and methodically work on them, in the end you'll find that writing in functional style is easier than the imperative. It just requires an alternative way of thinking. As the quick sorting example demonstrates, in Haskell you do not just work around the algorithm, but you actually capture its essence.

The rest of the course follows in those steps, makes use of the Glasgow Haskell compiler (more of the interpreter part since it focuses on real time feedback), comprised of the following lecture videos :

Lecture 1 - Introduction

Lecture 2 - First Steps

Lecture 3 - Types and Classes

Lecture 4 - Defining Functions

Lecture 5 - List Comprehensions

Lecture 6 - Recursive Functions

Lecture 7 - Exercises On Recursion

Lecture 8 - Higher-Order Functions

Lecture 9 - How To Think Recursively

Lecture 10 - Declaring Types and Classes

Lecture 11 - The Countdown Problem

Lecture 12 - Interactive Programming

Since the course is new and ongoing there are two lectures that are not yet available as videos, but will be once ready:

Lecture 13 - Exercises on interaction

Lecture 14 - Lazy evaluation

But wait, there's more. That was Part I, that introduced the basic concepts of pure programming in Haskell, structured around the core features of the language. Part II, Advanced Functional Programming, is designed for second year Computer Science students and covers a range of more advanced topics.

Fortunately this part too, has also been made available on YouTube. It involves building a Sudoku solver and comprises the following lectures:

Lecture 1 - Sudoku in Haskell I

Lecture 2 - Sudoku in Haskell II

Lecture 3 - Sudoku in Haskell III

Coursework 1 - Connect Four Game

Lecture 4 - Functors

Lecture 5 - Applicative Functors

Lecture 6 - Monads I

Lecture 7 - Monads II

Lecture 8 - Monads III

Lecture 9 - Monads IV

Missing :

Lecture11 - Coursework 2: monadic compiler

Lecture12 - Reasoning about programs

Lecture13 - Induction

Lecture14 - Making append vanish I

Lecture15 - Making append vanish II

Lecture16 - Compiler correctness

To sum up, this is really compelling material that reinvents the word "programming". As a matter of fact FP in Haskell is part of a larger module Programming Paradigms which involves being taught OOP in Java in parallel so that students can educate themselves in both styles and, of course, compare them.

A must watch, no matter if you're interested in Haskell or not. 


More Information

Functional Programming Syllabus

Functional Programming YouTube

Advanced Functional Programming Syllabus

Advanced Functional Programming YouTube

Related Articles

Does Math Help Programming Or Programming Help Math?

Functional Programming For Big Data Analytics

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.



What Programming Has Come To - Copy & Paste

A new April Fools joke is no joke as it reveals what others think of us. In particular Stack Overflow should know better than to bring its own programming methodology into disrepute...

Track Open Source Vulnerabilities With Google's OSV

The Open-Source Vulnerabilities, OSV, database is a new, open source,  project from Google that goes beyond the current state of CVE tracking.

More News





or email your comment to:

Last Updated ( Friday, 26 March 2021 )