Comment up part5

This commit is contained in:
Richard Feldman
2016-06-25 08:16:42 -07:00
parent ef168e59c2
commit a771127739

View File

@@ -103,11 +103,12 @@ initialModel =
decodeResults : String -> List SearchResult decodeResults : String -> List SearchResult
decodeResults json = decodeResults json =
case Json.Decode.decodeString responseDecoder json of -- TODO use Json.Decode.decodeString to translate this into either:
Ok results -> --
results -- * the search results, if decoding succeeded
-- * an empty list if decoding failed
Err err -> --
-- see http://package.elm-lang.org/packages/elm-lang/core/4.0.0/Json-Decode#decodeString
[] []