Last active
April 23, 2017 00:56
-
-
Save arecvlohe/0a17f688b3afa7c5c95b90206d38ff99 to your computer and use it in GitHub Desktop.
This file contains 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
update : Msg -> Model -> ( Model, Cmd Msg ) | |
update msg model = | |
case msg of | |
FetchQuote -> | |
( model, Random.generate NewQuote (Random.int 0 3) ) | |
NewQuote index -> | |
( withDefault defaultQuote (getAt index quotes), Cmd.none ) | |
NoOp -> | |
( model, Cmd.none ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment