Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created March 28, 2016 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/072ed2b493b26fc48077 to your computer and use it in GitHub Desktop.
Save chuck0523/072ed2b493b26fc48077 to your computer and use it in GitHub Desktop.
update : Action -> Model -> Model
update action model =
case action of
Reset -> init 0 0
Top act ->
{ model |
topCounter = Counter.update act model.topCounter
}
Bottom act ->
{ model |
bottomCounter = Counter.update act model.bottomCounter
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment