Skip to content

Instantly share code, notes, and snippets.

@rogeriochaves
Last active January 25, 2016 00:16
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 rogeriochaves/3991c4d18336bfb1bfeb to your computer and use it in GitHub Desktop.
Save rogeriochaves/3991c4d18336bfb1bfeb to your computer and use it in GitHub Desktop.
update : Action -> Control -> Control
update actionFor control =
case actionFor of
ActionForControl action -> updateControl action control
_ -> control
updateControl : ControlAction -> Control -> Control
updateControl action model =
case action of
ChangeVisibility visibility ->
{ model | visibility = visibility }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment