Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created April 2, 2016 22:19
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/9b806528b851836478f6344dbc795456 to your computer and use it in GitHub Desktop.
Save chuck0523/9b806528b851836478f6344dbc795456 to your computer and use it in GitHub Desktop.
Modify id counterAction ->
let updateCounter (counterID, counterModel) =
if counterID == id
then (counterID, Counter.update counterAction counterModel)
else (counterID, counterModel)
in
{ model | counters = List.map updateCounter model.counters }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment