F# Collections
F# core library has a set of collections and wrapper functional style modules that are useful. In this chapter, we will go through the basic list of collection modules with examples and understand their inner workings.
The following is a basic list of collection modules:
Seq
: This performs basic operations on any collection implementingIEnumerable<'T>
Array
: This performs basic operations onArray
collectionsList
: This performs basic operations onList
collectionsMap
: This performs functional style operators for theMap
typeSet
: This performs functional style operators for theSet
type
Sequence
Sequence is a logical series of elements of the same type. Sequences are lazy in nature and always iterate a single element at any given time, so it has better performance over large collections when compared to arrays or lists. Sequences are basically the .NET IEnumerable<'T>
collections that have an alias seq<'T>
type in F#. The Seq
module provides several...