Created
June 12, 2016 20:33
-
-
Save kittykatattack/a1fc8dc25c4deee7c7b89560e30c30aa to your computer and use it in GitHub Desktop.
Basic Elm 0.17 Beginner Program starter template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (..) | |
import Html.App as Html | |
-- MODEL | |
type alias Model = | |
{ value : Int | |
} | |
model : Model | |
model = | |
{ value = 0 | |
} | |
-- UPDATE | |
type Msg | |
= NoOp | |
update: Msg -> Model -> Model | |
update msg model = | |
case msg of | |
NoOp -> | |
model | |
-- VIEW | |
view : Model -> Html Msg | |
view model = | |
p [] [ text <| toString model.value ] | |
-- APP | |
main = | |
Html.beginnerProgram | |
{ model = model | |
, view = view | |
, update = update | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment