Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement