When I think of a tuple, I think more of "a small record" than "two things that are true together". I can definitely squint to see it, but I almost wonder if a new And type would be clearer to match the Either type.
I see. It turns out that a custom And type would be a small record as well - exactly the same shape as Tuple but with different names (i.e. the two types are "isomorphic").
When I think of a tuple, I think more of "a small record" than "two things that are true together". I can definitely squint to see it, but I almost wonder if a new
And
type would be clearer to match theEither
type.I see. It turns out that a custom
And
type would be a small record as well - exactly the same shape asTuple
but with different names (i.e. the two types are "isomorphic").Here's
Tuple<T1, T2>
from the .NET source code:And here's a custom
And
type:Usage: