Skip to content

Instantly share code, notes, and snippets.

@kittykatattack
Created June 12, 2016 20:33
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kittykatattack/a1fc8dc25c4deee7c7b89560e30c30aa to your computer and use it in GitHub Desktop.
Save kittykatattack/a1fc8dc25c4deee7c7b89560e30c30aa to your computer and use it in GitHub Desktop.
Basic Elm 0.17 Beginner Program starter template
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