Last active
May 21, 2016 20:47
-
-
Save j-hannes/1f4e17c23d0dd34d1063ac2f2b5ec9f0 to your computer and use it in GitHub Desktop.
Separate main and view
This file contains hidden or 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.App as Html | |
main = | |
Html.beginnerProgram { model = 0, view = view, update = update } | |
view state = | |
div [] | |
[ button [] [ text "-" ] | |
, span [] [ text (toString state) ] | |
, button [] [ text "+" ] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment