Created
August 7, 2016 08:54
-
-
Save the-undefined/eb15dfc63c56ea88991297c9faa8d02b to your computer and use it in GitHub Desktop.
Tiny implementation for incrementing a counter
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 (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