Skip to content

Instantly share code, notes, and snippets.

@the-undefined
Created August 7, 2016 08:54
Show Gist options
  • Save the-undefined/eb15dfc63c56ea88991297c9faa8d02b to your computer and use it in GitHub Desktop.
Save the-undefined/eb15dfc63c56ea88991297c9faa8d02b to your computer and use it in GitHub Desktop.
Tiny implementation for incrementing a counter
import Html exposing (div, text)
import Html.App as App
import Html.Events exposing (onClick)
type Msg = Increment
main : Program Never
main =
App.beginnerProgram
{ model = 0
, view = (\model ->
div [ onClick Increment] [
text("Model is: " ++ (toString model))
]
)
, update = (\n m -> m + 1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment