Lesson 15. Working with collections in F#
Something we’ve touched on only briefly is working with collections of data. Nearly everything we’ve done so far has involved a single record or tuple at a time. Yet F# has excellent capabilities when it comes to working with datasets. Working with data is one of its strongest features, as you’ll start to see in the coming lessons. I’ve set aside this lesson and three more to discuss working with collections. This lesson
- Introduces you to some of the key collection types in F#
- Gets you thinking about transformations in terms of pipelines
- Illustrates how to use immutable F# collections
Simultaneously one of C#’s greatest strengths and weaknesses is that it’s become an extremely flexible language, allowing developers to pick any number of ways to approach a problem. This is great in the sense that it can appeal to many types of developers, but it also means—particularly for newcomers—that it can be difficult to get a steer on a consistent, idiomatic way to solve that problem. One great example of that is working with collections. I see this as being divided into three camps: