add enum type (generalization of sum-type)

This commit is contained in:
Joeri Exelmans 2025-04-17 16:10:00 +02:00
parent 8653bb99c6
commit 0b262daf7f
6 changed files with 102 additions and 7 deletions

View file

@ -1,4 +1,5 @@
// Product-type (also called: pair, tuple)
// A Product-type always has only two fields, called "left" and "right".
// Product-types of more fields (called Structs) can be constructed by nesting Product-types.