Contact FutureLearn for Support
Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.


The basic mechanism for computing on any datastructure in Haskell is recursion. Recursion always has a base case and an induction case. For lists, the base case is the empty list [], the induction case is adding an element to the list x:xs

For list operations, it is usually easier to use higher-order functions like map (performing an operation on every element of a list) and foldl/foldr (reducing a list to a single value). Sometimes these functions are referred to as list combinators.

Share this article:

This article is from the free online course:

Functional Programming in Haskell: Supercharge Your Coding

University of Glasgow

Course highlights Get a taste of this course before you join:

  • Brief History of Haskell
    Brief History of Haskell

    What are the origins of the Haskell programming language? In this article, Dr Jeremy Singer explores the history of Haskell.