I’m learning Elm and trying to understand why do custom types have “Addition” cardinality (instead of multiplication) - as written in the Guide: https://guide.elm-lang.org/appendix/types_as_sets.html.
Let’s say we have Color type defined like this:
type Color = Red | White | Blue
and the Guide claims this:
Result Bool Color) = cardinality(
Bool) + cardinality(
Color) = 2 + 3 = 5
But to me the cardinality of this type looks to be 6 (multiplication), because I can have 6 possible values:
r1 = Result True Red r2 = Result True White r3 = Result True Blue r4 = Result False Red r5 = Result False White r6 = Result False Blue
So I’m surely not getting something here . I would appreciate your help here. Thanks!