3 ms·
A sum type (union type) solves the problem by making the list homogeneous. A `car` against such a list would return a member typed as this sum type and it would
by Xophmeister 11y ago
A sum type (union type) solves the problem by making the list homogeneous. A `car` against such a list would return a member typed as this sum type and it would then need to be extracted (e.g., with pattern matching) to get at the value.