Create a gist now

Instantly share code, notes, and snippets.

@zwilias /PhantomFormdata.elm Secret
Last active Apr 27, 2017

What would you like to do?
type FormData a = Data String
type Unsanitized = Unsanitized
type Sanitized = Sanitized
type alias Sanitizer = String -> String
fromString : String -> FormData Unsanitized
fromString data = Data data
sanitize : Sanitizer -> FormData Unsanitized -> FormData Sanitized
sanitize sanitizer (Data data) =
Data <| sanitizer data
submit : FormData Sanitized -> Cmd msg
submit = {- ... -}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment