[elm-discuss] Re: Pattern matching using existing bound variables

2016-12-04 Thread Michał Podwórny
Thanks for clearing things out! W dniu niedziela, 4 grudnia 2016 02:40:41 UTC+1 użytkownik Michał Podwórny napisał: > > Hi, > > Consider this: > let > x = 1 > in > case something of > x -> (...) > _ -> (...) > > The compiler will complai

[elm-discuss] Pattern matching using existing bound variables

2016-12-03 Thread Michał Podwórny
Hi, Consider this: let x = 1 in case something of x -> (...) _ -> (...) The compiler will complain that "The following pattern is redundant", pointing to the wildcard. I assume that Elm ignores the fact that "x" is already bound, re-binds it in the first case match and that indeed m