Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created April 2, 2016 22:15
Show Gist options
  • Save chuck0523/cda856b6ee73b5f31793f6390f49c736 to your computer and use it in GitHub Desktop.
Save chuck0523/cda856b6ee73b5f31793f6390f49c736 to your computer and use it in GitHub Desktop.
Insert ->
let newCounter = ( model.nextID, Counter.init 0 )
newCounters = model.counters ++ [ newCounter ]
in
{ model |
counters = newCounters,
nextID = model.nextID + 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment