2 ms·
Union is a better example than Enum to explain what algebraic data type is. It’s a natural progression from Struct as product type to Union as sum type.
by ww520 7y ago
Union is a better example than Enum to explain what algebraic data type is. It’s a natural progression from Struct as product type to Union as sum type.