Created
March 1, 2017 06:46
-
-
Save martimatix/e78f67df64e5fa78e6526bd8539c8836 to your computer and use it in GitHub Desktop.
URL Change Reactor
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
update : Msg -> Model -> ( Model, Cmd Msg ) | |
update msg model = | |
case msg of | |
UrlChange location -> | |
let | |
( nextPhrase, nextPhrases ) = | |
nextLineAndCycleList model.phrases | |
in | |
{ model | |
| location = location | |
, phrase = nextPhrase | |
, phrases = nextPhrases | |
} | |
! [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment