Created
October 21, 2016 15:43
-
-
Save SuperManEver/908852f7d7f079a43ee768d59cf06ed4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Html exposing (text) | |
| import Json.Decode exposing (..) | |
| decodeIds : Decoder (List Int) | |
| decodeIds = list int | |
| convertIds : String -> Decoder (List Int) -> Result String (List Int) | |
| convertIds str decoder = | |
| decodeString decoder str | |
| main = | |
| let | |
| ids = convertIds "[1,2,3,4]" decodeIds | |
| in | |
| text (toString ids) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment