view : Model -> Html Msgview model = fieldset [] [ checkbox model.notifications ToggleNotifications "Email Notifications" , checkbox model.autoplay ToggleAutoplay "Video Autoplay" , checkbox model.location ToggleLocation "Use Location" ]
checkbox : Bool -> msg -> String -> Html msgcheckbox b msg name = label [ style [("padding", "20px")] ] [ input [ type_ "checkbox", onClick msg, checked b ] [] , text name ]
update : Msg -> Model -> Modelupdate msg model = case msg of ToggleNotifications -> { model | notifications = True } -- instead of { model | notifications = not model.notifications }
...
...