Re: [elm-discuss] can't understand compiler error

2017-02-23 Thread Witold Szczerba
There are two things you do wrong here. First one is that you treat `if/else` like a statement, but in Elm it's an expression. In JavaScript or similar languages, the if/else means something like: *if (a) {* * doB();* *}* *// or* *if (a) {* * doB();* * doC();* * doWhateverElseYouWant();* *} e

Re: [elm-discuss] can't understand compiler error

2017-02-22 Thread Peter Damoc
In Elm you don't have statements, only expressions and the if model.flag == True then expression was not completed. It needs the else branch You cannot update the model in the view, only in update. On Wed, Feb 22, 2017 at 8:08 PM, Anurup Mitra wrote: > Hello! > > Disclaimer : I am not a pro

[elm-discuss] can't understand compiler error

2017-02-22 Thread Anurup Mitra
Hello! Disclaimer : I am not a programmer and don't understand computer science terms. The only formal education that I have had with programming is BASIC (school) and C (college - can't remember most of it :-p). Javascript seems clumsy and I came across Elm and tried learning it. Was working t