Skip to content

Instantly share code, notes, and snippets.

@wildeyes
Created September 30, 2017 15:35
Show Gist options
  • Save wildeyes/da93878a72c785b089d64bcd2799ba7b to your computer and use it in GitHub Desktop.
Save wildeyes/da93878a72c785b089d64bcd2799ba7b to your computer and use it in GitHub Desktop.
The Elm Switch (Case Of) Statement + Destructuring (Pattern Matching)
type User
= Activated
| Deleted
update state =
case state of
Activated ->
-- do something
Deleted ->
-- do again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment