discriminated union


discriminated union

(theory)The discriminated union of two sets A and B is

A + B = inA, a) | a in U inB, b)| b in

where inA and inB are arbitrary tags which specify whichsummand an element originates from.

A type (especially an algebraic data type) might bedescribed as a discriminated union if it is a sum type whoseobjects consist of a tag to say which part of the union theybelong to and a value of the corresponding type.