Summary
This chapter was a deep dive into the ubiquitous IEnumerable
, the F# data structure of sequences. Now, you should have a thorough understanding of sequences, the underlying operations, and query expressions. A sequence is a list of potential values computed on demand. Sequences can be created using a range expression, a sequence expression, the seq
keyword, library methods such as init
and initInfinite
from the Seq
module, or simply by treating some IEnumerable
as an F# sequence. The Seq
module has a large number of sequence-related operations available. You can easily implement custom enumeration (paging) in sequences by applying predicate-based filters. Last, but not the least, you should optimize the evaluations in the sequence and ...
Get Learning F# Functional Data Structures and Algorithms now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.