Union Types and Option Types

In past years, I've experimented union types in a low level language (Copper) and a higher level language. I got very interesting results but I'm currently experimenting a trimmed down version: just the option types. What is an Union Type? An union type is a list of two or more alternative types that a value can hold. For example: func f ( x : Int | String ) ... end the parameter x can be either a…