Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. type alias File = { name : String }
  2.  
  3. type Action = AgreeToTerms | AddFiles { files : List File }
  4. type State = Onboarding | Form { files : List File }
  5.  
  6. action = AgreeToTerms
  7. state = Form { files = [] }
  8.  
  9. result = case ( action, state ) of
  10. ( AgreeToTerms, Onboarding ) ->
  11. Form { files = [] }
  12. ( AddFiles { files }, Form form ) ->
  13. Form { files = form.files }
  14. ( _ , _ ) ->
  15. state
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement