• University of Glasgow

Functional Programming in Haskell: Supercharge Your Coding

Get an introduction to Haskell, the increasingly popular functional programming language, with this University of Glasgow course.

17,983 enrolled on this course

Functional Programming in Haskell: Supercharge Your Coding
  • Duration6 weeks
  • Weekly study4 hours
  • LearnFree
  • Extra BenefitsFrom $89Find out more

Do you want to develop software using the latest programming language paradigm? Haskell is a functional programming language, based on formal mathematical principles. As such, it is easy to reason about and develop, and it executes efficiently on modern multicore machines. From investment banks to social networks, everyone is adopting Haskell.

Get an introduction to functional programming in Haskell

On this introductory course, you will discover the power, elegance and simplicity of functional programming in Haskell. By the end, you will be able to:

  • characterise the differences between imperative and functional programming paradigms;
  • implement small-scale functional programs in elementary Haskell;
  • apply standard combinators for operating on lists;
  • create new algebraic data types and use recursion to define functions that traverse recursive types; and reason in a mathematical manner about data types, functions, recursion and similar functional constructs.

Learn with developers from the birthplace of Haskell

This course has been created by the School of Computing Science at the University of Glasgow – the virtual birthplace of the Haskell language, where many of its original developers worked. It will give you the opportunity to learn with these experts and join the growing, global community of Haskell programmers.

Download video: standard or HD

Skip to 0 minutes and 7 seconds Imagine programming with only pure functions.

Skip to 0 minutes and 12 seconds Imagine programs that are shorter, more elegant, easier to reason about, and better to execute in parallel on modern manycore processors and massive datacenters. You’ve just imagined functional programming. In this introduction to functional programming in Haskell you will learn powerful functional programming techniques such as immutable data structures, higher order functions, and lambdas. Learning functional programming will make you a better programmer whatever the language you use. These are just some of the reasons why functional programming is growing in popularity. Smashing Magazine describes functional as ‘the hipster of programming paradigms’. All major tech companies are adopting functional programming techniques, whether it’s Scala at Twitter, MapReduce at Google, or Haskell at Facebook.

Skip to 1 minute and 3 seconds In fact, early work on the Haskell functional programming language took place here at the University of Glasgow, and we’ve been teaching it to our undergraduate Computing Science students for many years. This course is aimed at people who have some prior programming experience but want to discover functional programming for themselves. We introduce the Haskell language with interactive tutorials and practical programming exercises. We’ll take you from the basics through to advanced features of functional programming. And don’t worry, we’ll deconstruct all the alarming buzzwords and phrases from lambda calculus to monads. Also, in a series of exclusive interviews with key Haskell language designers, we will explore the history, present status and future prospects of functional programming.

Skip to 1 minute and 50 seconds Functional languages are becoming more and more popular. All mainstream languages are incorporating functional constructs. So now is the time to begin functional programming in Haskell. We hope you’ll join us on this course.

Syllabus

  • Week 1

    Haskell First Steps

    • Introduction

      Introduction to the Haskell course

    • Haskell Basics: Expressions and Equations

      In this activity we introduce basic Haskell syntax and the concepts of expressions and equations.

    • Haskell Basics: Reduction, Functions and Lists

      In this activity we explain how results are computed in Haskell, and the essential concepts of functions and lists.

    • Finding Out More

      Resources for new Haskell programmers

  • Week 2

    Haskell Building Blocks

    • More Basic Haskell

      Introducing booleans and lists

    • Input and Output

      How to do text-based input and output in Haskell

    • Installing GHC

      How to install the Haskell Platform, a common platform for using and developing applications in Haskell.

  • Week 3

    Data Structures and Types

    • Functions on Lists

      Lists, recursion and higher-order functions

    • Custom Data Types

      Defining your own datatypes, in particular trees

    • Haskell History

      Diving into the history of the Haskell language, we explore how and why it was invented.

  • Week 4

    When Programs Get Bigger

    • Program Structure

      How to organise larger programs

    • Parsing Text

      In this activity you will learn how to use Haskell for parsing of text.

    • Am I Right?

      The Quickcheck tool allows us to test the correctness of our Haskell programs.

  • Week 5

    Hardcore Haskell

    • Laziness and Infinite Data structures

      We explore what lazy evaluation is and how you can use it to create infinite data structures

    • More about Types

      Types, lambda functions and type classes

    • Haskell in the Real World

      Haskell started life as an academic project. However it is now widely used in commercial software projects.

  • Week 6

    Think like a Functional Programmer

    • Type Classes

      In this activity we learn how to define our own type classes and we introduce the basic formalism underlying functional programming, the lambda calculus.

    • Geek Greek

      We introduce the ideas of lambda calculus and show how it fits into a historical context

    • The M-word

      Introducing monadic computations

    • So long and thanks for all the fun(ctions)!

      Now the time has come to say goodbye! We encourage you to continue your functional programming journey.

When would you like to start?

Start straight away and learn at your own pace. If the course hasn’t started yet you’ll see the future date listed below.

  • Available now

What will you achieve?

By the end of the course, you‘ll be able to...

  • Develop simple programs involving basic Haskell techniques, including pure function definitions
  • Produce definitions of algebraic data types and apply recursion to define functions that traverse such types
  • Interpret data structures and function interfaces using types
  • Apply formal methods to prove properties of functional programs
  • Develop, modify, and explore code using standard Haskell platform tools
  • Justify why a program uses common standard monads (including IO and Maybe)
  • Explore standard combinators for operating on lists

Who is the course for?

This course is intended for learners who already have experience of at least one programming language, such as Python or Java. You might be a computer science student, a software developer who wants to learn a new programming style, or somebody considering university study in computer science or information technology.

What do people say about this course?

I would like to sign off from this course by expressing my thanks to all the gang at Glasgow for their work and enthusiasm in making this all happen. I really enjoyed being part of the genesis of a new functional programming course. I'll be sure to drop into any future re-runs to see how the course evolves.

Course Learner

I enjoyed taking this course a lot because it provided a structured framework for getting to grips with the language and a very friendly and collaborative atmosphere which made it fun. The camaraderie seemed to embrace everyone, including lecturers, mentors, and fellow students --- we had a great bunch of people. This very constructive interaction with others and their many helpful suggestions made all the difference versus just working through a book. Being able to help others occasionally just made it that much better.

Course Learner

Who will you learn with?

Professor in Computing Science at the University of Glasgow. I program mainly in Haskell, C++ and Perl and love parallel and heterogeneous programming. http://www.dcs.gla.ac.uk/~wim/
@HaskellMOOC

I am a lecturer in Computing Science at the University of Glasgow. I am moderately fluent in the following languages: Haskell, Java, C, Scouse and New Testament Greek.

* http://dcs.gla.ac.uk/~jsinger

I am a Research Associate at the University of Glasgow. I specialise in Type-Driven Development of Communicating Systems using the dependently typed language Idris. I also use Haskell, Java, & Python.

Who developed the course?

The University of Glasgow

Founded in 1451, the University of Glasgow is the fourth oldest university in the English-speaking world. It is a member of the prestigious Russell Group of leading UK research universities.

  • Established1451
  • LocationGlasgow, Scotland, UK
  • World rankingTop 70Source: QS World University Rankings 2020

Learner reviews

Join this course

Start this course for free, upgrade for extra benefits, or buy Unlimited to access this course and hundreds of other short courses for a year.

Free
$0

Join free and you will get:

  • Access to this course for 8 weeks

Upgrade
$89

Upgrade this course and you will get:

  • Access to this course for as long as it’s on FutureLearn
  • A print and digital Certificate of Achievement once you’re eligible

Unlimited (New!)
$279.99 for one year

Buy Unlimited and you will get:

  • Access to this course, and hundreds of other FutureLearn short courses and tests for a year
  • A printable digital Certificate of Achievement on all short courses once you’re eligible
  • The freedom to keep access to any course you've achieved a digital Certificate of Achievement on, for as long as the course exists on FutureLearn
  • The flexibility to complete your choice of short courses in your own time within the year
Find out more about upgrades or Unlimited.

Get a taste of this course

Find out what this course is like by previewing some of the course steps before you join: