> > Hi Anarup, Try changing your update function to: update : Msg -> Model -> Model update msg model = case msg of Name name -> unsetFlag { model | name = name }
Age age -> unsetFlag { model | age = age } Password password -> unsetFlag { model | password = password } PasswordAgain password -> unsetFlag { model | passwordAgain = password } SetFlag -> { model | flag = True } The problem is you are still trying to do things in a procedural way, but each branch of your case statement needs to be a single value (and all of them need to be the same type). You are trying to do 2 separate statements, I have turned it into one statement/value. It is confusing at first but very worthwhile to learn. Reading the first few chapters (1-6) of Learn You a Haskell gives you the essential ideas. http://learnyouahaskell.com/chapters You don't need to go any further than Chapter 6, it will not be very relevant to Elm. Good luck -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.