I think the phrase you're looking for instead of "dual type" is "sum type". Sum types are widely used in functional programming languages and are an example of an algebraic data type (ADT). The other common type of ADT is the "product type" which corresponds to structs in Rust.
Stick with it. This stuff didn't really click with me either until I started working with Elixir and OCaml. Thanks for sharing your experience!
I think the phrase you're looking for instead of "dual type" is "sum type". Sum types are widely used in functional programming languages and are an example of an algebraic data type (ADT). The other common type of ADT is the "product type" which corresponds to structs in Rust.
Stick with it. This stuff didn't really click with me either until I started working with Elixir and OCaml. Thanks for sharing your experience!
Thanks, sum type is good to know, that helps me also study more on them!