Created
June 24, 2017 22:21
-
-
Save bchase/917d0204e0fadf75477f64aef8479fa1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main exposing (..) | |
| type Msg | |
| = AddVoteResponse (Result Error Model) | |
| update : Msg -> Model -> ( Model, Cmd Msg ) | |
| update msg model = | |
| case msg of | |
| -- AddVoteResponse (Ok { girlVotes, boyVotes }) -> | |
| -- let | |
| -- model_ = | |
| -- { model | girlVotes = girlVotes, boyVotes = boyVotes } | |
| -- |> recalculate | |
| -- in | |
| -- model_ ! [] | |
| AddVoteResponse (Ok model_) -> | |
| model_ |> recalculate ! [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment