Re: [elm-discuss] ADT: How to know whether two values have the same constructor?

2017-07-16 Thread David Andrews
You could write something like: haveSameConstructor : Bla -> Bla -> Bool haveSameConstructor first second = case (first, second) of (A _, A _) -> True (B _, B _) -> True _ -> False On Sun, Jul 16, 2017 at 6:33 PM Birowsky wrote: > Given: > > type

[elm-discuss] ADT: How to know whether two values have the same constructor?

2017-07-16 Thread Birowsky
Given: type Bla = A Int | B Int valA1 = A 1 valA2 = A 2 Is there a way for me to check whether `valA1` has been constructed with the constructor of `valA2`? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and