Introduction to Lists

Get introduced to the list datatype.

In the next lessons, we will study the list datatype, the essential datatype of Haskell and functional programming in general. As lists are defined recursively themselves, they fit well to a language that uses recursion as its primary problem solving technique.

The list datatype

A list is a linear data structure for a collection of elements. Each element points to the next element, except the last element, which points to a special nil value (the empty list). Here is a visualization of a list containing the three numbers 1, 2, 3.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy