A product type holds one value of each of its component types at once: a tuple (A, B) or a struct. A sum type holds one value of exactly one of its component types, together with which one: a Rust enum. The types built from basic types by products and sums, possibly recursively, are the algebraic data types.
Computer Science · Begrippenlijst
Wat is Product type, sum type, algebraic data type?
Ook bekend als: product type · sum type · algebraic data type