Here are the abbreviations for every US State, as a union type, and two functions to convert to state names as strings.
Get the states name from the abbreviation
UsState.toState AZ == "arizona" -- TrueGet the states abbreviation from its name
UsState.fromState "Arizona" == Just AZ -- True
UsState.fromState "Arizona " == Just AZ -- True
UsState.fromState "arizona" == Just AZ -- True
UsState.fromState "puerto rico" == Nothing -- True
Every US State abbreviation.