I’m wondering if there’s a way to get values out of a custom type, in an example similar to the following, without using a case switch. Wondering if I’m missing something obvious.
type A = A Int Int
getFirst : A -> Int
getFirst a =
case A of
A x _ -> x
I know that the above would be better modeled as a tuple, and a record would do as well, but this is just a trite example to help illustrate my question.