Last active
July 7, 2019 20:37
-
-
Save OliverJAsh/8f939c26b347a4b856f3c5dbbbe87ad3 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
type alias File = { name : String } | |
type Action = AgreeToTerms | AddFiles { files : List File } | |
type State = Onboarding | Form { files : List File } | |
action = AgreeToTerms | |
state = Form { files = [] } | |
result = case ( action, state ) of | |
( AgreeToTerms, Onboarding ) -> | |
Form { files = [] } | |
( AddFiles { files }, Form form ) -> | |
Form { files = form.files } | |
( _ , _ ) -> | |
state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment