Sequence of an indefinite length as a design pattern
The conventional engineering vision of data transformations is that they occur over finite collections materialized in the memory, hence allowing these collections to be enumerated with Seq.length
, yielding a number of elements. However, the F# sequences (as well as .NET IEnumerable<T>
per se) grant the following generalization: in some cases, a more math-centric vision might be useful, which suggests looking at sequences as countable but not necessarily finite.
A meticulous reader may immediately object that the countable entity, when applied to practical computing, is necessarily finite because eventually, it is limited by underlying physical hardware, which comes out in boundary values, for ...
Get F# 4.0 Design Patterns 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.