Skip to content

Instantly share code, notes, and snippets.

@Chadtech
Created December 21, 2015 07:40
Show Gist options
  • Select an option

  • Save Chadtech/6b389f01a073346a7787 to your computer and use it in GitHub Desktop.

Select an option

Save Chadtech/6b389f01a073346a7787 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