Status
In Progress
Discriminated Unions give Verse a new ‘union’ data type that holds type variants, that can be assigned to their corresponding values, allowing developers to create more advanced case blocks and decision trees.
A union declares named variants, each able to carry a payload, and a value of that union type holds exactly one variant at a time. Developers destructure the payload with case, which matches on the variant currently stored and binds the value inside it.