Created
September 24, 2018 00:55
-
-
Save arsduo/2076d94a8d498566d17bb5456a8df847 to your computer and use it in GitHub Desktop.
Simple Elm Program
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
type alias Model = | |
{ videoPlaying : Bool | |
, quizState : QuizDataTypeWithQuestionAndAnswerInfo | |
} | |
type Msg | |
= PlayVideo VideoId | |
| QuizAnswerSelected QuestionId AnswerId | |
update : Msg -> Model -> ( Model, Cmd Msg ) | |
update msg model = | |
case msg of | |
PlayVideo videoId -> | |
updateForVideoPlaying model videoId | |
QuizAnswerSelected questionId answerId -> | |
updateForAnswerSelection model questionId answerId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment