Introduction

Completed

Programs consist of many different kinds of data. In programming, the idea is to represent data as distinct types, such as strings or numbers. Collections are another important data type. A collection is more than a single piece of data that can be accessed via a named reference. You group data in a collection, such as a list of items in a sales order or contacts in an address book.

In F#, there are three different data structures you can use to represent collections, each with its own pros and cons, purpose, and methods. The methods that come with these data structures do everything from adding, removing, and ordering items in a list to performing mathematical operations on the list.

You might even find that using a collections method replaces the need to, for example, use a loop or even conditional structures, such as if...else statements.

Collections can be powerful and, ultimately, it's up to you what types of collections you use and how you use them.

In this module, you learn about collection data structures, their APIs, and scenarios in which you might apply them.

Learning objectives

In this module, you:

  • Explore collection data structures.
  • Learn about the basic properties in a list structure.
  • Use the list module to carry out some more advanced operations.