Re: [elm-discuss] help appricated to get-started

2016-06-23 Thread Immanuel Normann
Am Donnerstag, 23. Juni 2016 10:59:32 UTC+2 schrieb Peter Damoc: > > It is preferable to case against a finite number of cases than against an > infinite number that forces you to have a "_" fallback. Indeed. Replacing the cases of strings by cases of the finite number of CheckBox type const

Re: [elm-discuss] help appricated to get-started

2016-06-23 Thread Peter Damoc
Excellent! Here is another take on this extraction just to give you some food for thought. import Html exposing (..) import Html.App exposing (beginnerProgram) import Html.Attributes exposing (..) import Html.Events exposing (onCheck, onClick) main = beginnerProgram { model = model, view

Re: [elm-discuss] help appricated to get-started

2016-06-23 Thread Immanuel Normann
Thanks Peter! You are right: I simply forgot to add model as argument to my radio function. For whom it may interest, this is my revised version that works as required - with little minor improvments: - I replaced the clear checkbox by a button and changed the Model and Msg type and the update

Re: [elm-discuss] help appricated to get-started

2016-06-22 Thread Peter Damoc
You should have gotten a compiler error in your radio code but you somehow ended up with the wrong thing. :) The model in the radio is not the current model of your running up but it is the initial model which is also called "model". So, make sure your radio buttons receive the current value of t

[elm-discuss] help appricated to get-started

2016-06-22 Thread Immanuel Normann
Hi, as a former enthusiastic Haskell programmer I got excited about Elm and eventually started today to learn Elm by examples (http://elm-lang.org/examples). My first exercise was about checkboxes: http://elm-lang.org/examples/checkboxes There at the very bottom an exercise is proposed: > --