Result True Red and the others r{n} you provided don’t have any meaning.
Result is a type constructor (which accepts two concrete types), and Bool and Color are both concrete types. It is defined as such:
Result e a
= Err e
| Ok a
Which means it can have Cardinality(e)values possible for the Err value constructor to accept and Cardinality(a)values possible in the case of the Ok value constructor.
Bool has two values : True and False. Same with Color who has three values: Red, White and Blue.
Therefore, Result Bool Color can only have 5 values:
v1 = Err True
v2 = Err False
v3 = Ok Red
v4 = Ok White
v5 = Ok Blue
Ooh @Punie, now I think I understand (seeing Err and Ok in your example helped me). You (and the Guide) are actually reffering to core Elm package type Result which is defined like this:
type Result error value
= Ok value
| Err error
But I was thinking about Result type defined like this:
but it is isomorphic (ie. equivalent) to a tuple (Bool, Color) and in that case, it is a product type and you are correct in declaring that the cardinality of such a type is Cardinality(Bool) * Cardinality(Color) == 6