January 2023
Intermediate to advanced
648 pages
17h 32m
English

A tuple is an ordered collection of values. There are tuples for ordered pairs, ordered triples, ordered quadruples, and so on. The types of the values in a tuple are generally different, but they could be the same.
In this chapter, we’ll discuss tuples and their generalization: the type constructor. Function types, list types, and tuple types are all examples of type constructors. We’ll present a unified way to think about these type constructors, which on the surface appear different, but all share essential features. Finally, we’ll revisit numerical integration to show how tuples, in conjunction with iteration, ...
Read now
Unlock full access